mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
refactor<*>: rewrite all with AvaloniaUI
This commit is contained in:
parent
0136904612
commit
2a62596999
521 changed files with 19780 additions and 23244 deletions
34
src/ViewModels/FastForwardWithoutCheckout.cs
Normal file
34
src/ViewModels/FastForwardWithoutCheckout.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System.Threading.Tasks;
|
||||
|
||||
namespace SourceGit.ViewModels {
|
||||
public class FastForwardWithoutCheckout : Popup {
|
||||
public Models.Branch Local {
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public Models.Branch To {
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public FastForwardWithoutCheckout(Repository repo, Models.Branch local, Models.Branch upstream) {
|
||||
_repo = repo;
|
||||
Local = local;
|
||||
To = upstream;
|
||||
View = new Views.FastForwardWithoutCheckout() { DataContext = this };
|
||||
}
|
||||
|
||||
public override Task<bool> Sure() {
|
||||
_repo.SetWatcherEnabled(false);
|
||||
return Task.Run(() => {
|
||||
SetProgressDescription("Fast-Forward ...");
|
||||
new Commands.Fetch(_repo.FullPath, To.Remote, Local.Name, To.Name, SetProgressDescription).Exec();
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
private Repository _repo = null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue