From f4b5569ecc77150c7bde00b9368aa81fe33b7cfd Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 6 Sep 2007 19:29:43 +0000 Subject: WinGui: - DVD Title and chapter drop downs now reset when a new DVD source is scanned. - Queue code cleaned up a bit. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@930 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/frmQueue.cs | 30 +++++++----------------------- win/C#/frmReadDVD.cs | 11 +++++------ 2 files changed, 12 insertions(+), 29 deletions(-) diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs index 5dfdec47b..c40ff268d 100644 --- a/win/C#/frmQueue.cs +++ b/win/C#/frmQueue.cs @@ -20,10 +20,8 @@ namespace Handbrake InitializeComponent(); } - int initialListCount = 0; - bool started = false; + #region Queue Handling - private void btn_q_encoder_Click(object sender, EventArgs e) { progressBar.Value = 0; @@ -33,27 +31,15 @@ namespace Handbrake ThreadPool.QueueUserWorkItem(startProc); } - /* - * - * Code to Handle the CLI and updating of the UI as each process is completed. - * - */ - [DllImport("user32.dll")] public static extern void LockWorkStation(); [DllImport("user32.dll")] public static extern int ExitWindowsEx(int uFlags, int dwReason); - private void processItem() - { - - } - private void startProc(object state) { try { - initialListCount = list_queue.Items.Count; while (list_queue.Items.Count != 0) { string query = list_queue.Items[0].ToString(); @@ -128,11 +114,8 @@ namespace Handbrake progressBar.Update(); } - /* - * - * Code to Re-arrange / Delete items from the Queue - * - */ + #endregion + #region Queue Management private void btn_up_Click(object sender, EventArgs e) @@ -175,9 +158,8 @@ namespace Handbrake } #endregion - /* - * Hide the Queue Window - */ + #region Window Management + private void btn_Close_Click(object sender, EventArgs e) { this.Hide(); @@ -187,5 +169,7 @@ namespace Handbrake { this.WindowState = FormWindowState.Minimized; } + + #endregion } } \ No newline at end of file diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs index f697e3425..8adfb1d2a 100644 --- a/win/C#/frmReadDVD.cs +++ b/win/C#/frmReadDVD.cs @@ -20,7 +20,6 @@ namespace Handbrake private Parsing.DVD thisDvd; private Process hbProc; private delegate void UpdateUIHandler(); - //private int cancel = 0; public frmReadDVD(string inputFile, frmMain parent, frmDvdInfo dvdInfoWindow) { @@ -70,7 +69,10 @@ namespace Handbrake mainWindow.drp_dvdtitle.Items.Clear(); mainWindow.drp_dvdtitle.Items.AddRange(thisDvd.Titles.ToArray()); - + mainWindow.drp_dvdtitle.Text = "Automatic"; + mainWindow.drop_chapterFinish.Text = "Auto"; + mainWindow.drop_chapterStart.Text = "Auto"; + this.Close(); } catch(Exception exc) @@ -87,15 +89,12 @@ namespace Handbrake } Functions.CLI process = new Functions.CLI(); + private void startProc(object state) { //string query = "-i " + '"' + inputFile + '"' + " -t0"; // hbProc = process.runCli(this, query, true, true, false, true); - //********************************************************************************************************************************************* - /* - * Quick and Dirty hack to get around the stderr crashes of hbcli. Lets try feeding brians parser text straight from a text file. - */ try { string appPath = Application.StartupPath.ToString()+ "\\"; -- cgit v1.2.3