using System.Threading.Tasks; namespace SourceGit.Views.Popups { /// /// 清理远程已删除分支 /// public partial class Prune : Controls.PopupWidget { private string repo = null; private string remote = null; public Prune(string repo, string remote) { this.repo = repo; this.remote = remote; InitializeComponent(); } public override string GetTitle() { return App.Text("RemoteCM.Prune"); } public override Task Start() { return Task.Run(() => { Models.Watcher.SetEnabled(repo, false); var succ = new Commands.Remote(repo).Prune(remote); Models.Watcher.SetEnabled(repo, true); return succ; }); } } }