diff options
author | brianmario <[email protected]> | 2007-07-18 08:32:09 +0000 |
---|---|---|
committer | brianmario <[email protected]> | 2007-07-18 08:32:09 +0000 |
commit | 2ffb589f0bd275962e526c673b01d7d08237245d (patch) | |
tree | 4ed35989279524a7121a42841f372d803a2995bb /win/C#/frmDvdInfo.cs | |
parent | a0985795ca8a5f003272f713c57cd208b8097872 (diff) |
WinGui:
continued adding to CLI manager code
updated frmDvdInfo to display data parsed from STDOUT/STDERR
minor updates to form constructors
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@708 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmDvdInfo.cs')
-rw-r--r-- | win/C#/frmDvdInfo.cs | 28 |
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 |