mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 21:24:59 +00:00
style<Welcome>: replace system message dialog with a custom one
This commit is contained in:
parent
5434629f4c
commit
a9bc0fec21
4 changed files with 123 additions and 9 deletions
|
@ -91,12 +91,15 @@ namespace SourceGit.Views.Widgets {
|
|||
var repo = (sender as Button).DataContext as Models.Repository;
|
||||
if (repo == null) return;
|
||||
|
||||
var result = MessageBox.Show(App.Text("ConfirmRemoveRepo", repo.Path), App.Text("Apply.Warn"), MessageBoxButton.YesNo);
|
||||
if (result == MessageBoxResult.Yes) {
|
||||
Models.Preference.Instance.RemoveRepository(repo.Path);
|
||||
UpdateVisibles();
|
||||
}
|
||||
|
||||
var confirmDialog = new ConfirmDialog(
|
||||
App.Text("Apply.Warn"),
|
||||
App.Text("ConfirmRemoveRepo", repo.Path),
|
||||
() => {
|
||||
Models.Preference.Instance.RemoveRepository(repo.Path);
|
||||
UpdateVisibles();
|
||||
});
|
||||
confirmDialog.Owner = App.Current.MainWindow;
|
||||
confirmDialog.ShowDialog();
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue