1 /* frmExceptionWindow.cs $
\r
2 This file is part of the HandBrake source code.
\r
3 Homepage: <http://handbrake.fr>.
\r
4 It may be used under the terms of the GNU General Public License. */
\r
6 namespace HandBrake.ApplicationServices.Views
\r
9 using System.Windows.Forms;
\r
12 /// A window to display Exceptions in a form which can be easily copied and reported by users.
\r
14 public partial class ExceptionWindow : Form
\r
17 /// Initializes a new instance of the <see cref="ExceptionWindow"/> class.
\r
19 public ExceptionWindow()
\r
21 InitializeComponent();
\r
25 /// Setup the window with the error message.
\r
27 /// <param name="shortError">
\r
28 /// The short error.
\r
30 /// <param name="longError">
\r
33 public void Setup(string shortError, string longError)
\r
35 lbl_shortError.Text = shortError;
\r
36 rtf_exceptionFull.Text = shortError + Environment.NewLine + longError;
\r
40 /// Copy the Exception Information to the Clipboard.
\r
42 /// <param name="sender">
\r
45 /// <param name="e">
\r
48 private void BtnCopyClick(object sender, EventArgs e)
\r
50 Clipboard.SetDataObject(rtf_exceptionFull.SelectedText != string.Empty ? rtf_exceptionFull.SelectedText : rtf_exceptionFull.Text, true);
\r
54 /// Copy from the right click menu
\r
56 /// <param name="sender">
\r
59 /// <param name="e">
\r
62 private void MnuCopyLogClick(object sender, EventArgs e)
\r
64 Clipboard.SetDataObject(rtf_exceptionFull.SelectedText != string.Empty ? rtf_exceptionFull.SelectedText : rtf_exceptionFull.Text, true);
\r
68 /// Close the window
\r
70 /// <param name="sender">
\r
73 /// <param name="e">
\r
76 private void BtnCloseClick(object sender, EventArgs e)
\r