OSDN Git Service

LinGui: make Help->Guide work on windows/mingw
[handbrake-jp/handbrake-jp-git.git] / win / C# / Functions / Main.cs
index 552c6a9..d7380b2 100644 (file)
@@ -162,7 +162,9 @@ namespace Handbrake.Functions
             }\r
             catch (Exception exc)\r
             {\r
-                MessageBox.Show("Unable to save Chapter Makrers file! \nChapter marker names will NOT be saved in your encode \n\n" + exc, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+                frmExceptionWindow exceptionWindow = new frmExceptionWindow();\r
+                exceptionWindow.Setup("Unable to save Chapter Makrers file! \nChapter marker names will NOT be saved in your encode", exc.ToString());\r
+                exceptionWindow.ShowDialog();\r
                 return false;\r
             }\r
         }\r
@@ -328,7 +330,9 @@ namespace Handbrake.Functions
             }\r
             catch (Exception e)\r
             {\r
-                MessageBox.Show("Unable to retrieve version information from the CLI. \nError:\n" + e);\r
+                frmExceptionWindow exceptionWindow = new frmExceptionWindow();\r
+                exceptionWindow.Setup("Unable to retrieve version information from the CLI.", e.ToString());\r
+                exceptionWindow.ShowDialog();\r
             }\r
         }\r
 \r
@@ -811,5 +815,21 @@ namespace Handbrake.Functions
 \r
             return sb.ToString().Trim();\r
         }\r
+\r
+        /// <summary>\r
+        /// Show the Exception Window\r
+        /// </summary>\r
+        /// <param name="shortError">\r
+        /// The short error.\r
+        /// </param>\r
+        /// <param name="longError">\r
+        /// The long error.\r
+        /// </param>\r
+        public static void ShowExceptiowWindow(string shortError, string longError)\r
+        {\r
+            frmExceptionWindow exceptionWindow = new frmExceptionWindow();\r
+            exceptionWindow.Setup(shortError, longError);\r
+            exceptionWindow.Show();\r
+        }\r
     }\r
 }
\ No newline at end of file