OSDN Git Service

add win/C# diff files
[handbrake-jp/handbrake-jp.git] / win / C# / HandBrake.Framework / Views / ExceptionWindow.cs.diff
diff --git a/win/C#/HandBrake.Framework/Views/ExceptionWindow.cs.diff b/win/C#/HandBrake.Framework/Views/ExceptionWindow.cs.diff
new file mode 100644 (file)
index 0000000..2e5b4d9
--- /dev/null
@@ -0,0 +1,87 @@
+diff --git a/win/C#/HandBrake.Framework/Views/ExceptionWindow.cs b/win/C#/HandBrake.Framework/Views/ExceptionWindow.cs
+new file mode 100644
+index 0000000..25dc6fd
+--- /dev/null
++++ b/win/C#/HandBrake.Framework/Views/ExceptionWindow.cs
+@@ -0,0 +1,81 @@
++/*  ExceptionWindow.cs $\r
++    This file is part of the HandBrake source code.\r
++    Homepage: <http://handbrake.fr>.\r
++    It may be used under the terms of the GNU General Public License. */\r
++\r
++namespace HandBrake.Framework.Views\r
++{\r
++    using System;\r
++    using System.Windows.Forms;\r
++\r
++    /// <summary>\r
++    /// A window to display Exceptions in a form which can be easily copied and reported by users.\r
++    /// </summary>\r
++    public partial class ExceptionWindow : Form\r
++    {\r
++        /// <summary>\r
++        /// Initializes a new instance of the <see cref="ExceptionWindow"/> class.\r
++        /// </summary>\r
++        public ExceptionWindow()\r
++        {\r
++            InitializeComponent();\r
++        }\r
++\r
++        /// <summary>\r
++        /// Setup the window with the error message.\r
++        /// </summary>\r
++        /// <param name="shortError">\r
++        /// The short error.\r
++        /// </param>\r
++        /// <param name="longError">\r
++        /// The long error.\r
++        /// </param>\r
++        public void Setup(string shortError, string longError)\r
++        {\r
++            lbl_shortError.Text = shortError;\r
++            rtf_exceptionFull.Text = shortError + Environment.NewLine + longError;\r
++        }\r
++\r
++        /// <summary>\r
++        /// Copy the Exception Information to the Clipboard.\r
++        /// </summary>\r
++        /// <param name="sender">\r
++        /// The sender.\r
++        /// </param>\r
++        /// <param name="e">\r
++        /// The e.\r
++        /// </param>\r
++        private void BtnCopyClick(object sender, EventArgs e)\r
++        {\r
++            Clipboard.SetDataObject(rtf_exceptionFull.SelectedText != string.Empty ? rtf_exceptionFull.SelectedText : rtf_exceptionFull.Text, true);\r
++        }\r
++\r
++        /// <summary>\r
++        /// Copy from the right click menu\r
++        /// </summary>\r
++        /// <param name="sender">\r
++        /// The sender.\r
++        /// </param>\r
++        /// <param name="e">\r
++        /// The e.\r
++        /// </param>\r
++        private void MnuCopyLogClick(object sender, EventArgs e)\r
++        {\r
++            Clipboard.SetDataObject(rtf_exceptionFull.SelectedText != string.Empty ? rtf_exceptionFull.SelectedText : rtf_exceptionFull.Text, true);\r
++        } \r
++\r
++        /// <summary>\r
++        /// Close the window\r
++        /// </summary>\r
++        /// <param name="sender">\r
++        /// The sender.\r
++        /// </param>\r
++        /// <param name="e">\r
++        /// The e.\r
++        /// </param>\r
++        private void BtnCloseClick(object sender, EventArgs e)\r
++        {\r
++            this.Close();\r
++        }\r
++    }\r
++}\r