forked from sourcegit-scm/sourcegit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeleteSubmodule.cs
More file actions
36 lines (30 loc) · 900 Bytes
/
Copy pathDeleteSubmodule.cs
File metadata and controls
36 lines (30 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Threading.Tasks;
namespace SourceGit.ViewModels
{
public class DeleteSubmodule : Popup
{
public string Submodule
{
get;
private set;
}
public DeleteSubmodule(Repository repo, string submodule)
{
_repo = repo;
Submodule = submodule;
View = new Views.DeleteSubmodule() { DataContext = this };
}
public override Task<bool> Sure()
{
_repo.SetWatcherEnabled(false);
ProgressDescription = "Deleting submodule ...";
return Task.Run(() =>
{
var succ = new Commands.Submodule(_repo.FullPath).Delete(Submodule);
CallUIThread(() => _repo.SetWatcherEnabled(true));
return succ;
});
}
private readonly Repository _repo = null;
}
}