From 9285d8a9613254b84f0f549bce9dfcb629564ff1 Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 9 Jan 2008 20:02:18 +0000 Subject: WinGui: - Added an Activity window which can view a verbose log from the CLI after an encode has completed. (it would be nice if someone could find a way of making this live!) - The main GUI window now has an icon based toolbar similar to the macGUI instead of having standard buttons along the bottom for Encode and Queue. - Some of the controls on the Options panel have had transparent backgrounds added so they don't look out of place on theme'd computers. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1181 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/frmMain.cs | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'win/C#/frmMain.cs') diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 295d19ea7..8e69a8f2c 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -397,6 +397,12 @@ namespace Handbrake rtf_h264advanced.Text = ""; } + private void btn_ActivityWindow_Click(object sender, EventArgs e) + { + Form ActivityWindow = new frmActivityWindow(); + ActivityWindow.ShowDialog(); + } + #endregion #region frmMain Actions @@ -1066,9 +1072,8 @@ namespace Handbrake [DllImport("user32.dll")] public static extern int ExitWindowsEx(int uFlags, int dwReason); - private void btn_queue_Click(object sender, EventArgs e) + private void btn_start_Click(object sender, EventArgs e) { - if (text_source.Text == "" || text_source.Text == "Click 'Browse' to continue" || text_destination.Text == "") MessageBox.Show("No source OR destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); else @@ -1079,17 +1084,13 @@ namespace Handbrake else query = hb_common_func.GenerateTheQuery(this); - queueWindow.list_queue.Items.Add(query); - queueWindow.Show(); + ThreadPool.QueueUserWorkItem(procMonitor, query); + lbl_encode.Visible = true; + lbl_encode.Text = "Encoding in Progress"; } } - private void showQueue() - { - queueWindow.Show(); - } - - private void btn_encode_Click(object sender, EventArgs e) + private void btn_add2Queue_Click(object sender, EventArgs e) { if (text_source.Text == "" || text_source.Text == "Click 'Browse' to continue" || text_destination.Text == "") MessageBox.Show("No source OR destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); @@ -1101,12 +1102,21 @@ namespace Handbrake else query = hb_common_func.GenerateTheQuery(this); - ThreadPool.QueueUserWorkItem(procMonitor, query); - lbl_encode.Visible = true; - lbl_encode.Text = "Encoding in Progress"; + queueWindow.list_queue.Items.Add(query); + queueWindow.Show(); } } + private void btn_showQueue_Click(object sender, EventArgs e) + { + showQueue(); + } + + private void showQueue() + { + queueWindow.Show(); + } + private void procMonitor(object state) { // Make sure we are not already encoding and if we are then display an error. -- cgit v1.2.3