mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
33 lines
892 B
C#
33 lines
892 B
C#
using System.Threading.Tasks;
|
|
|
|
namespace SourceGit.Views.Popups {
|
|
|
|
/// <summary>
|
|
/// 删除远程确认
|
|
/// </summary>
|
|
public partial class DeleteRemote : Controls.PopupWidget {
|
|
private string repo = null;
|
|
private string remote = null;
|
|
|
|
public DeleteRemote(string repo, string remote) {
|
|
this.repo = repo;
|
|
this.remote = remote;
|
|
|
|
InitializeComponent();
|
|
txtTarget.Text = remote;
|
|
}
|
|
|
|
public override string GetTitle() {
|
|
return App.Text("DeleteRemote");
|
|
}
|
|
|
|
public override Task<bool> Start() {
|
|
return Task.Run(() => {
|
|
Models.Watcher.SetEnabled(repo, false);
|
|
new Commands.Remote(repo).Delete(remote);
|
|
Models.Watcher.SetEnabled(repo, true);
|
|
return true;
|
|
});
|
|
}
|
|
}
|
|
}
|