summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-11-24 12:59:50 +0000
committersr55 <[email protected]>2018-11-24 12:59:50 +0000
commit84a395ec86b092d91ae1757d1f2a70e54de0c547 (patch)
tree148234058ad628dbf0ec5f0b3b1c800134cb6257 /win
parent0967fc688af68462f04cebf99a30a59e6253266e (diff)
WinGui: Tidy up a few instances of mesagebox.show.
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/PresetService.cs4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs10
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs2
4 files changed, 10 insertions, 10 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
index 42eb5c26f..ef280b5b7 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
@@ -917,11 +917,11 @@ namespace HandBrakeWPF.Services.Presets
{
if (!this.CanUpdatePreset(preset.Name))
{
- MessageBox.Show(Resources.Main_PresetErrorBuiltInName, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_PresetErrorBuiltInName, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
- MessageBoxResult result = MessageBox.Show(string.Format(Resources.Main_PresetOverwriteWarning, preset.Name), Resources.Overwrite, MessageBoxButton.YesNo, MessageBoxImage.Warning);
+ MessageBoxResult result = this.errorService.ShowMessageBox(string.Format(Resources.Main_PresetOverwriteWarning, preset.Name), Resources.Overwrite, MessageBoxButton.YesNo, MessageBoxImage.Warning);
if (result == MessageBoxResult.Yes)
{
this.Update(preset);
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index bd7bc420d..1d5c7187d 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1852,7 +1852,7 @@ namespace HandBrakeWPF.ViewModels
if (this.SelectedTitle == null)
{
- MessageBox.Show(
+ this.errorService.ShowMessageBox(
Resources.MainView_SubtitleBeforeScanError,
Resources.Error,
MessageBoxButton.OK,
@@ -2094,7 +2094,7 @@ namespace HandBrakeWPF.ViewModels
}
else
{
- MessageBox.Show(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
+ this.errorService.ShowMessageBox(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -2106,11 +2106,11 @@ namespace HandBrakeWPF.ViewModels
if (this.selectedPreset != null)
{
this.presetService.SetDefault(this.selectedPreset);
- MessageBox.Show(string.Format(Resources.Main_NewDefaultPreset, this.selectedPreset.Name), Resources.Main_Presets, MessageBoxButton.OK, MessageBoxImage.Information);
+ this.errorService.ShowMessageBox(string.Format(Resources.Main_NewDefaultPreset, this.selectedPreset.Name), Resources.Main_Presets, MessageBoxButton.OK, MessageBoxImage.Information);
}
else
{
- MessageBox.Show(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
+ this.errorService.ShowMessageBox(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -2155,7 +2155,7 @@ namespace HandBrakeWPF.ViewModels
}
else
{
- MessageBox.Show(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
+ this.errorService.ShowMessageBox(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index dd45d5d55..e18074681 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -1284,12 +1284,12 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void ClearLogHistory()
{
- MessageBoxResult result = MessageBox.Show(Resources.OptionsView_ClearLogDirConfirm, Resources.OptionsView_ClearLogs,
+ MessageBoxResult result = this.errorService.ShowMessageBox(Resources.OptionsView_ClearLogDirConfirm, Resources.OptionsView_ClearLogs,
MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
if (result == MessageBoxResult.Yes)
{
GeneralUtilities.ClearLogFiles(0);
- MessageBox.Show(Resources.OptionsView_LogsCleared, Resources.OptionsView_Notice, MessageBoxButton.OK, MessageBoxImage.Information);
+ this.errorService.ShowMessageBox(Resources.OptionsView_LogsCleared, Resources.OptionsView_Notice, MessageBoxButton.OK, MessageBoxImage.Information);
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index 556f741f1..2e31a2a04 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -352,7 +352,7 @@ namespace HandBrakeWPF.ViewModels
this.JobsPending = string.Format(Resources.QueueViewModel_JobsPending, this.queueProcessor.Count);
this.IsQueueRunning = false;
- MessageBox.Show(Resources.QueueViewModel_QueuePauseNotice, Resources.QueueViewModel_Queue,
+ this.errorService.ShowMessageBox(Resources.QueueViewModel_QueuePauseNotice, Resources.QueueViewModel_Queue,
MessageBoxButton.OK, MessageBoxImage.Information);
}