diff options
author | sr55 <[email protected]> | 2007-07-08 18:29:26 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2007-07-08 18:29:26 +0000 |
commit | 3e669fc96e687340cc17ecd8d0894457905f9cfe (patch) | |
tree | 8034a9519b58acf6cf43d8f5de41c3684580d44e /win/C#/frmReadDVD.cs | |
parent | 218db228fba662be9aacfaf2c120e1e61b04bfd7 (diff) |
WinGui:
- All Supported Files (for File dialog window)
- Few other minor changes.
Initial C# code project which is due to replace current vb.net code. Partially functional.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@658 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmReadDVD.cs')
-rw-r--r-- | win/C#/frmReadDVD.cs | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs new file mode 100644 index 000000000..d861e8ead --- /dev/null +++ b/win/C#/frmReadDVD.cs @@ -0,0 +1,56 @@ +using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Handbrake
+{
+ public partial class frmReadDVD : Form
+ {
+
+ string inputFile;
+
+ public frmReadDVD(string inputFile)
+ {
+ InitializeComponent();
+ this.inputFile = inputFile;
+ }
+
+ private void frmReadDVD_Load(object sender, EventArgs e)
+ {
+ //start(inputFile);
+ }
+
+ public void start(string filename)
+ {
+ MessageBox.Show(filename);
+ string query = "-i " + '"' + filename + '"' + " -t0";
+ System.Diagnostics.Process hbProc = new System.Diagnostics.Process();
+ hbProc.StartInfo.FileName = "hbcli.exe";
+ hbProc.StartInfo.RedirectStandardOutput = true;
+ hbProc.StartInfo.RedirectStandardError = true;
+ hbProc.StartInfo.StandardOutputEncoding = System.Text.Encoding.UTF8;
+ hbProc.StartInfo.StandardErrorEncoding = System.Text.Encoding.UTF8;
+ hbProc.StartInfo.Arguments = query;
+ hbProc.StartInfo.UseShellExecute = false;
+ hbProc.Start();
+
+ while (hbProc.StandardOutput.BaseStream.CanRead && !hbProc.HasExited)
+ {
+ MessageBox.Show(hbProc.StandardOutput.ReadLine());
+ MessageBox.Show(hbProc.StandardError.ReadLine());
+ Console.Read();
+ }
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ start(inputFile);
+ }
+
+
+ }
+}
\ No newline at end of file |