summaryrefslogtreecommitdiffstats
path: root/win/C#/frmReadDVD.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/frmReadDVD.cs')
-rw-r--r--win/C#/frmReadDVD.cs56
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