summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-09-14 21:59:25 +0100
committersr55 <[email protected]>2018-09-14 21:59:25 +0100
commit683505eb8228641be1d206f9a1e0a5c060bb0ed9 (patch)
tree8e51afbb2d08ba3915e6055c7e8c66c39628b487 /win/CS
parent4d7a05ed8dd8ab8fb04ddf6722a30e9b05485933 (diff)
WinGui: Add a prompt on Stop Encode to confirm. Fixes #1571
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs18
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesUI.resx6
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs11
3 files changed, 34 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
index 59ccc80ac..30e22c278 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
@@ -1069,6 +1069,24 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Stop Encode.
+ /// </summary>
+ public static string MainView_StopEncode {
+ get {
+ return ResourceManager.GetString("MainView_StopEncode", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Are you sure you wish to stop thie encode?.
+ /// </summary>
+ public static string MainView_StopEncodeConfirm {
+ get {
+ return ResourceManager.GetString("MainView_StopEncodeConfirm", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Please choose a source to encode before trying to import a subtitle file..
/// </summary>
public static string MainView_SubtitleBeforeScanError {
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
index 67aa94343..804475873 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
@@ -1040,4 +1040,10 @@ This will not affect your current settings in the Subtitle tab.</value>
<data name="Options_Encoding" xml:space="preserve">
<value>Encoding</value>
</data>
+ <data name="MainView_StopEncode" xml:space="preserve">
+ <value>Stop Encode</value>
+ </data>
+ <data name="MainView_StopEncodeConfirm" xml:space="preserve">
+ <value>Are you sure you wish to stop thie encode?</value>
+ </data>
</root> \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index a41fb01dc..e31a8bb98 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1782,7 +1782,16 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void StopEncode()
{
- this.queueProcessor.Stop();
+ MessageBoxResult result = this.errorService.ShowMessageBox(
+ ResourcesUI.MainView_StopEncodeConfirm,
+ ResourcesUI.MainView_StopEncode,
+ MessageBoxButton.YesNo,
+ MessageBoxImage.Question);
+
+ if (result == MessageBoxResult.Yes)
+ {
+ this.queueProcessor.Stop();
+ }
}
/// <summary>