]> granicus.if.org Git - handbrake/commitdiff
WinGui: Add a prompt on Stop Encode to confirm. Fixes #1571
authorsr55 <sr55.hb@outlook.com>
Fri, 14 Sep 2018 20:59:25 +0000 (21:59 +0100)
committersr55 <sr55.hb@outlook.com>
Fri, 14 Sep 2018 20:59:25 +0000 (21:59 +0100)
win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs

index 59ccc80ac32c8302f1f2b42df4edc8af9fe42307..30e22c278768f418817b484ec55987eb116ff6eb 100644 (file)
@@ -1068,6 +1068,24 @@ namespace HandBrakeWPF.Properties {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Stop Encode.\r
+        /// </summary>\r
+        public static string MainView_StopEncode {\r
+            get {\r
+                return ResourceManager.GetString("MainView_StopEncode", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Are you sure you wish to stop thie encode?.\r
+        /// </summary>\r
+        public static string MainView_StopEncodeConfirm {\r
+            get {\r
+                return ResourceManager.GetString("MainView_StopEncodeConfirm", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to Please choose a source to encode before trying to import a subtitle file..\r
         /// </summary>\r
index 67aa94343bc8123a378e94d93b9cd729a3f90d1d..80447587317cccca98b2f3335dfa9e04a80e2723 100644 (file)
@@ -1040,4 +1040,10 @@ This will not affect your current settings in the Subtitle tab.</value>
   <data name="Options_Encoding" xml:space="preserve">\r
     <value>Encoding</value>\r
   </data>\r
+  <data name="MainView_StopEncode" xml:space="preserve">\r
+    <value>Stop Encode</value>\r
+  </data>\r
+  <data name="MainView_StopEncodeConfirm" xml:space="preserve">\r
+    <value>Are you sure you wish to stop thie encode?</value>\r
+  </data>\r
 </root>
\ No newline at end of file
index a41fb01dcd0c32b8ab38be13c9e7049a1ae5b6f0..e31a8bb98d0d8d49b40c5c97571d8d9a2e7ff646 100644 (file)
@@ -1782,7 +1782,16 @@ namespace HandBrakeWPF.ViewModels
         /// </summary>\r
         public void StopEncode()\r
         {\r
-            this.queueProcessor.Stop();\r
+            MessageBoxResult result = this.errorService.ShowMessageBox(\r
+                ResourcesUI.MainView_StopEncodeConfirm,\r
+                ResourcesUI.MainView_StopEncode,\r
+                MessageBoxButton.YesNo,\r
+                MessageBoxImage.Question);\r
+\r
+            if (result == MessageBoxResult.Yes)\r
+            {\r
+                this.queueProcessor.Stop();\r
+            }\r
         }\r
 \r
         /// <summary>\r