summaryrefslogtreecommitdiffstats
path: root/win/C#/frmDvdInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/frmDvdInfo.cs')
-rw-r--r--win/C#/frmDvdInfo.cs28
1 files changed, 23 insertions, 5 deletions
diff --git a/win/C#/frmDvdInfo.cs b/win/C#/frmDvdInfo.cs
index 130ffa2f3..7d58cb146 100644
--- a/win/C#/frmDvdInfo.cs
+++ b/win/C#/frmDvdInfo.cs
@@ -10,19 +10,37 @@ namespace Handbrake
{
public partial class frmDvdInfo : Form
{
-
- /*
- * This window should be used to display the RAW output of the handbrake CLI which is produced during the scan.
- */
-
+ /// <summary>
+ /// This window should be used to display the RAW output of the handbrake CLI which is produced during the scan.
+ /// </summary>
public frmDvdInfo()
{
InitializeComponent();
+ Parsing.Parser.OnReadLine += HandleParsedData;
+ Parsing.Parser.OnReadToEnd += HandleParsedData;
+ this.rtf_dvdInfo.Text = string.Empty;
+ }
+
+ private void HandleParsedData(object Sender, string Data)
+ {
+ if (this.InvokeRequired)
+ {
+ this.BeginInvoke(new Parsing.DataReadEventHandler(HandleParsedData), new object[] { Sender, Data });
+ return;
+ }
+ this.rtf_dvdInfo.AppendText(Data + System.Environment.NewLine);
}
private void btn_close_Click(object sender, EventArgs e)
{
this.Close();
}
+
+ protected override void OnClosing(CancelEventArgs e)
+ {
+ e.Cancel = true;
+ this.Hide();
+ base.OnClosing(e);
+ }
}
} \ No newline at end of file