mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00:00
refactor(PopupManager): rewrite popup
This commit is contained in:
parent
28e3a1bb27
commit
7558bbd4f2
34 changed files with 183 additions and 221 deletions
|
@ -38,8 +38,7 @@ namespace SourceGit.UI {
|
|||
dialog.type.Data = dialog.FindResource("Icon.Branch") as Geometry;
|
||||
dialog.desc.Content = branch.Name;
|
||||
|
||||
var popup = App.GetPopupManager(opened);
|
||||
popup?.Show(dialog);
|
||||
opened.GetPopupManager()?.Show(dialog);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -57,8 +56,7 @@ namespace SourceGit.UI {
|
|||
dialog.type.Data = dialog.FindResource("Icon.Commit") as Geometry;
|
||||
dialog.desc.Content = $"{commit.ShortSHA} {commit.Subject}";
|
||||
|
||||
var popup = App.GetPopupManager(opened);
|
||||
popup?.Show(dialog);
|
||||
opened.GetPopupManager()?.Show(dialog);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -67,7 +65,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private async void Start(object sender, RoutedEventArgs e) {
|
||||
var popup = App.GetPopupManager(repo);
|
||||
var popup = repo.GetPopupManager();
|
||||
popup?.Lock();
|
||||
|
||||
var autoStash = chkAutoStash.IsChecked == true;
|
||||
|
@ -77,7 +75,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
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