mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
refactor(PopupManager): rewrite popup
This commit is contained in:
parent
28e3a1bb27
commit
7558bbd4f2
34 changed files with 183 additions and 221 deletions
|
@ -36,8 +36,7 @@ namespace SourceGit.UI {
|
|||
txtBranchType.Content = "Hotfix :";
|
||||
break;
|
||||
default:
|
||||
var popup = App.GetPopupManager(repo);
|
||||
popup?.Close();
|
||||
repo.GetPopupManager()?.Close();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -50,8 +49,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="repo"></param>
|
||||
/// <param name="branch"></param>
|
||||
public static void Show(Git.Repository repo, Git.Branch branch) {
|
||||
var popup = App.GetPopupManager(repo);
|
||||
popup?.Show(new GitFlowFinishBranch(repo, branch));
|
||||
repo.GetPopupManager()?.Show(new GitFlowFinishBranch(repo, branch));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -60,7 +58,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private async void Sure(object sender, RoutedEventArgs e) {
|
||||
var popup = App.GetPopupManager(repo);
|
||||
var popup = repo.GetPopupManager();
|
||||
popup?.Lock();
|
||||
await Task.Run(() => repo.FinishGitFlowBranch(branch));
|
||||
popup?.Close(true);
|
||||
|
@ -72,7 +70,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Cancel(object sender, RoutedEventArgs e) {
|
||||
App.GetPopupManager(repo)?.Close();
|
||||
repo.GetPopupManager()?.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue