refactor<*>: rewrite all with AvaloniaUI

This commit is contained in:
leo 2024-02-06 15:08:37 +08:00
parent 0136904612
commit 2a62596999
521 changed files with 19780 additions and 23244 deletions

View 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;
}
}