summaryrefslogtreecommitdiffstats
path: root/win/C#
diff options
context:
space:
mode:
authorsr55 <[email protected]>2007-11-18 23:09:49 +0000
committersr55 <[email protected]>2007-11-18 23:09:49 +0000
commit0690db87ecdd90d33c3c3f43113bedb497b6305d (patch)
tree01eeffc061b28f69556c834753d958c6918b4d4a /win/C#
parentaf3277fd9e511b768a083bc77023e2e0437578fc (diff)
WinGui:
- Changed Queue to a listview. - Added human readable encode information for the item currently encoding. - Window design improved. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1066 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#')
-rw-r--r--win/C#/frmQueue.Designer.cs485
-rw-r--r--win/C#/frmQueue.cs260
-rw-r--r--win/C#/frmQueue.resx3
3 files changed, 473 insertions, 275 deletions
diff --git a/win/C#/frmQueue.Designer.cs b/win/C#/frmQueue.Designer.cs
index 12ecd50d0..7f1394f07 100644
--- a/win/C#/frmQueue.Designer.cs
+++ b/win/C#/frmQueue.Designer.cs
@@ -28,61 +28,72 @@ namespace Handbrake
/// </summary>
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmQueue));
- this.btn_down = new System.Windows.Forms.Button();
- this.btn_up = new System.Windows.Forms.Button();
+ this.label3 = new System.Windows.Forms.Label();
+ this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.listview_queue = new System.Windows.Forms.ListView();
+ this.c_job = new System.Windows.Forms.ColumnHeader();
this.btn_delete = new System.Windows.Forms.Button();
+ this.btn_up = new System.Windows.Forms.Button();
+ this.btn_down = new System.Windows.Forms.Button();
+ this.lbl_status = new System.Windows.Forms.Label();
+ this.btn_cancel = new System.Windows.Forms.Button();
+ this.lbl_progressValue = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.progressBar = new System.Windows.Forms.ProgressBar();
this.btn_q_encoder = new System.Windows.Forms.Button();
- this.list_queue = new System.Windows.Forms.ListBox();
this.btn_Close = new System.Windows.Forms.Button();
- this.progressBar = new System.Windows.Forms.ProgressBar();
- this.label2 = new System.Windows.Forms.Label();
- this.lbl_progressValue = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
- this.pictureBox1 = new System.Windows.Forms.PictureBox();
- this.label3 = new System.Windows.Forms.Label();
- this.btn_cancel = new System.Windows.Forms.Button();
- this.lbl_status = new System.Windows.Forms.Label();
- this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
- this.text_edit = new System.Windows.Forms.TextBox();
+ this.lbl_source = new System.Windows.Forms.Label();
+ this.lbl_dest = new System.Windows.Forms.Label();
+ this.lbl_vEnc = new System.Windows.Forms.Label();
+ this.lbl_aEnc = new System.Windows.Forms.Label();
+ this.lbl_chapt = new System.Windows.Forms.Label();
+ this.lbl_title = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
- this.btn_updateQuery = new System.Windows.Forms.Button();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.txt_editQuery = new System.Windows.Forms.TextBox();
+ this.btn_update = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
- // btn_down
+ // label3
//
- this.btn_down.BackColor = System.Drawing.SystemColors.ControlLight;
- this.btn_down.FlatAppearance.BorderColor = System.Drawing.Color.Black;
- this.btn_down.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_down.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_down.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_down.Location = new System.Drawing.Point(650, 141);
- this.btn_down.Name = "btn_down";
- this.btn_down.Size = new System.Drawing.Size(64, 22);
- this.btn_down.TabIndex = 33;
- this.btn_down.TabStop = false;
- this.btn_down.Text = "Down";
- this.btn_down.UseVisualStyleBackColor = false;
- this.btn_down.Click += new System.EventHandler(this.btn_down_Click);
+ this.label3.AutoSize = true;
+ this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label3.Location = new System.Drawing.Point(50, 24);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(82, 13);
+ this.label3.TabIndex = 41;
+ this.label3.Text = "Current Job";
//
- // btn_up
+ // pictureBox1
//
- this.btn_up.BackColor = System.Drawing.SystemColors.ControlLight;
- this.btn_up.FlatAppearance.BorderColor = System.Drawing.Color.Black;
- this.btn_up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_up.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_up.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_up.Location = new System.Drawing.Point(649, 113);
- this.btn_up.Name = "btn_up";
- this.btn_up.Size = new System.Drawing.Size(64, 22);
- this.btn_up.TabIndex = 32;
- this.btn_up.TabStop = false;
- this.btn_up.Text = "Up";
- this.btn_up.UseVisualStyleBackColor = false;
- this.btn_up.Click += new System.EventHandler(this.btn_up_Click);
+ this.pictureBox1.Image = global::Handbrake.Properties.Resources.Queue;
+ this.pictureBox1.Location = new System.Drawing.Point(12, 12);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.Size = new System.Drawing.Size(32, 32);
+ this.pictureBox1.TabIndex = 40;
+ this.pictureBox1.TabStop = false;
+ //
+ // listview_queue
+ //
+ this.listview_queue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.listview_queue.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.c_job});
+ this.listview_queue.Location = new System.Drawing.Point(12, 116);
+ this.listview_queue.MultiSelect = false;
+ this.listview_queue.Name = "listview_queue";
+ this.listview_queue.ShowItemToolTips = true;
+ this.listview_queue.Size = new System.Drawing.Size(707, 146);
+ this.listview_queue.TabIndex = 42;
+ this.listview_queue.UseCompatibleStateImageBehavior = false;
+ this.listview_queue.View = System.Windows.Forms.View.Details;
+ this.listview_queue.SelectedIndexChanged += new System.EventHandler(this.listview_queue_SelectedIndexChanged);
+ //
+ // c_job
+ //
+ this.c_job.Text = "Job";
+ this.c_job.Width = 721;
//
// btn_delete
//
@@ -91,15 +102,102 @@ namespace Handbrake
this.btn_delete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_delete.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_delete.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_delete.Location = new System.Drawing.Point(650, 187);
+ this.btn_delete.Location = new System.Drawing.Point(152, 268);
this.btn_delete.Name = "btn_delete";
this.btn_delete.Size = new System.Drawing.Size(64, 22);
- this.btn_delete.TabIndex = 31;
+ this.btn_delete.TabIndex = 43;
this.btn_delete.TabStop = false;
this.btn_delete.Text = "Delete";
this.btn_delete.UseVisualStyleBackColor = false;
this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click);
//
+ // btn_up
+ //
+ this.btn_up.BackColor = System.Drawing.SystemColors.ControlLight;
+ this.btn_up.FlatAppearance.BorderColor = System.Drawing.Color.Black;
+ this.btn_up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_up.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btn_up.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
+ this.btn_up.Location = new System.Drawing.Point(12, 268);
+ this.btn_up.Name = "btn_up";
+ this.btn_up.Size = new System.Drawing.Size(64, 22);
+ this.btn_up.TabIndex = 44;
+ this.btn_up.TabStop = false;
+ this.btn_up.Text = "Up";
+ this.btn_up.UseVisualStyleBackColor = false;
+ this.btn_up.Click += new System.EventHandler(this.btn_up_Click);
+ //
+ // btn_down
+ //
+ this.btn_down.BackColor = System.Drawing.SystemColors.ControlLight;
+ this.btn_down.FlatAppearance.BorderColor = System.Drawing.Color.Black;
+ this.btn_down.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_down.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btn_down.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
+ this.btn_down.Location = new System.Drawing.Point(82, 268);
+ this.btn_down.Name = "btn_down";
+ this.btn_down.Size = new System.Drawing.Size(64, 22);
+ this.btn_down.TabIndex = 45;
+ this.btn_down.TabStop = false;
+ this.btn_down.Text = "Down";
+ this.btn_down.UseVisualStyleBackColor = false;
+ this.btn_down.Click += new System.EventHandler(this.btn_down_Click);
+ //
+ // lbl_status
+ //
+ this.lbl_status.AutoSize = true;
+ this.lbl_status.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_status.Location = new System.Drawing.Point(273, 304);
+ this.lbl_status.Name = "lbl_status";
+ this.lbl_status.Size = new System.Drawing.Size(176, 13);
+ this.lbl_status.TabIndex = 52;
+ this.lbl_status.Text = "Encode Queue Completed!";
+ this.lbl_status.Visible = false;
+ //
+ // btn_cancel
+ //
+ this.btn_cancel.BackColor = System.Drawing.SystemColors.ControlLight;
+ this.btn_cancel.FlatAppearance.BorderColor = System.Drawing.Color.Black;
+ this.btn_cancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_cancel.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btn_cancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
+ this.btn_cancel.Location = new System.Drawing.Point(142, 336);
+ this.btn_cancel.Name = "btn_cancel";
+ this.btn_cancel.Size = new System.Drawing.Size(91, 22);
+ this.btn_cancel.TabIndex = 51;
+ this.btn_cancel.TabStop = false;
+ this.btn_cancel.Text = "Stop Queue";
+ this.btn_cancel.UseVisualStyleBackColor = false;
+ this.btn_cancel.Visible = false;
+ this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);
+ //
+ // lbl_progressValue
+ //
+ this.lbl_progressValue.AutoSize = true;
+ this.lbl_progressValue.Location = new System.Drawing.Point(689, 304);
+ this.lbl_progressValue.Name = "lbl_progressValue";
+ this.lbl_progressValue.Size = new System.Drawing.Size(30, 13);
+ this.lbl_progressValue.TabIndex = 50;
+ this.lbl_progressValue.Text = "0 %";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(9, 304);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(62, 13);
+ this.label2.TabIndex = 49;
+ this.label2.Text = "Progress:";
+ //
+ // progressBar
+ //
+ this.progressBar.BackColor = System.Drawing.SystemColors.ControlLight;
+ this.progressBar.Location = new System.Drawing.Point(75, 299);
+ this.progressBar.Name = "progressBar";
+ this.progressBar.Size = new System.Drawing.Size(608, 23);
+ this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
+ this.progressBar.TabIndex = 48;
+ //
// btn_q_encoder
//
this.btn_q_encoder.BackColor = System.Drawing.SystemColors.ControlLight;
@@ -107,26 +205,15 @@ namespace Handbrake
this.btn_q_encoder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_q_encoder.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_q_encoder.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_q_encoder.Location = new System.Drawing.Point(12, 345);
+ this.btn_q_encoder.Location = new System.Drawing.Point(11, 336);
this.btn_q_encoder.Name = "btn_q_encoder";
this.btn_q_encoder.Size = new System.Drawing.Size(124, 22);
- this.btn_q_encoder.TabIndex = 29;
+ this.btn_q_encoder.TabIndex = 47;
this.btn_q_encoder.TabStop = false;
this.btn_q_encoder.Text = "Encode Video(s)";
this.btn_q_encoder.UseVisualStyleBackColor = false;
this.btn_q_encoder.Click += new System.EventHandler(this.btn_q_encoder_Click);
//
- // list_queue
- //
- this.list_queue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.list_queue.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.list_queue.HorizontalScrollbar = true;
- this.list_queue.Location = new System.Drawing.Point(13, 69);
- this.list_queue.Name = "list_queue";
- this.list_queue.Size = new System.Drawing.Size(630, 184);
- this.list_queue.TabIndex = 28;
- this.list_queue.SelectedIndexChanged += new System.EventHandler(this.list_queue_SelectedIndexChanged);
- //
// btn_Close
//
this.btn_Close.BackColor = System.Drawing.SystemColors.ControlLight;
@@ -134,174 +221,147 @@ namespace Handbrake
this.btn_Close.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_Close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_Close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_Close.Location = new System.Drawing.Point(606, 345);
+ this.btn_Close.Location = new System.Drawing.Point(605, 336);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(108, 22);
- this.btn_Close.TabIndex = 27;
+ this.btn_Close.TabIndex = 46;
this.btn_Close.TabStop = false;
this.btn_Close.Text = "Close Window";
this.btn_Close.UseVisualStyleBackColor = false;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
- // progressBar
- //
- this.progressBar.BackColor = System.Drawing.SystemColors.ControlLight;
- this.progressBar.Location = new System.Drawing.Point(67, 307);
- this.progressBar.Name = "progressBar";
- this.progressBar.Size = new System.Drawing.Size(608, 23);
- this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
- this.progressBar.TabIndex = 34;
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(10, 313);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(51, 13);
- this.label2.TabIndex = 35;
- this.label2.Text = "Progress:";
- //
- // lbl_progressValue
- //
- this.lbl_progressValue.AutoSize = true;
- this.lbl_progressValue.Location = new System.Drawing.Point(690, 311);
- this.lbl_progressValue.Name = "lbl_progressValue";
- this.lbl_progressValue.Size = new System.Drawing.Size(24, 13);
- this.lbl_progressValue.TabIndex = 36;
- this.lbl_progressValue.Text = "0 %";
- //
// label1
//
this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(51, 43);
+ this.label1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label1.Location = new System.Drawing.Point(50, 46);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(166, 13);
- this.label1.TabIndex = 40;
- this.label1.Text = "List of items ready to be encoded:";
- //
- // pictureBox1
- //
- this.pictureBox1.Image = global::Handbrake.Properties.Resources.Queue;
- this.pictureBox1.Location = new System.Drawing.Point(13, 13);
- this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(32, 32);
- this.pictureBox1.TabIndex = 38;
- this.pictureBox1.TabStop = false;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label3.Location = new System.Drawing.Point(51, 25);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(48, 13);
- this.label3.TabIndex = 39;
- this.label3.Text = "Queue";
- //
- // btn_cancel
- //
- this.btn_cancel.BackColor = System.Drawing.SystemColors.ControlLight;
- this.btn_cancel.FlatAppearance.BorderColor = System.Drawing.Color.Black;
- this.btn_cancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_cancel.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_cancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_cancel.Location = new System.Drawing.Point(143, 345);
- this.btn_cancel.Name = "btn_cancel";
- this.btn_cancel.Size = new System.Drawing.Size(91, 22);
- this.btn_cancel.TabIndex = 41;
- this.btn_cancel.TabStop = false;
- this.btn_cancel.Text = "Stop Queue";
- this.toolTip1.SetToolTip(this.btn_cancel, "This will prevent any more encode processes from starting. It will not stop the c" +
- "urrent process!");
- this.btn_cancel.UseVisualStyleBackColor = false;
- this.btn_cancel.Visible = false;
- this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);
- //
- // lbl_status
- //
- this.lbl_status.AutoSize = true;
- this.lbl_status.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_status.Location = new System.Drawing.Point(317, 311);
- this.lbl_status.Name = "lbl_status";
- this.lbl_status.Size = new System.Drawing.Size(176, 13);
- this.lbl_status.TabIndex = 42;
- this.lbl_status.Text = "Encode Queue Completed!";
- this.lbl_status.Visible = false;
- //
- // text_edit
- //
- this.text_edit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.text_edit.Location = new System.Drawing.Point(113, 259);
- this.text_edit.Name = "text_edit";
- this.text_edit.Size = new System.Drawing.Size(530, 20);
- this.text_edit.TabIndex = 43;
- this.toolTip1.SetToolTip(this.text_edit, "Avoid using this feature when the encoder is about to start a new task. You may o" +
- "verwrite the wrong job");
+ this.label1.Size = new System.Drawing.Size(99, 52);
+ this.label1.TabIndex = 53;
+ this.label1.Text = "Source:\r\nDestination:\r\nDVD Title:\r\nDVD Chapters:";
+ //
+ // lbl_source
+ //
+ this.lbl_source.AutoSize = true;
+ this.lbl_source.Location = new System.Drawing.Point(175, 46);
+ this.lbl_source.Name = "lbl_source";
+ this.lbl_source.Size = new System.Drawing.Size(12, 13);
+ this.lbl_source.TabIndex = 54;
+ this.lbl_source.Text = "-";
+ //
+ // lbl_dest
+ //
+ this.lbl_dest.AutoSize = true;
+ this.lbl_dest.Location = new System.Drawing.Point(175, 59);
+ this.lbl_dest.Name = "lbl_dest";
+ this.lbl_dest.Size = new System.Drawing.Size(12, 13);
+ this.lbl_dest.TabIndex = 55;
+ this.lbl_dest.Text = "-";
+ this.lbl_dest.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // lbl_vEnc
+ //
+ this.lbl_vEnc.AutoSize = true;
+ this.lbl_vEnc.Location = new System.Drawing.Point(285, 72);
+ this.lbl_vEnc.Name = "lbl_vEnc";
+ this.lbl_vEnc.Size = new System.Drawing.Size(12, 13);
+ this.lbl_vEnc.TabIndex = 56;
+ this.lbl_vEnc.Text = "-";
+ //
+ // lbl_aEnc
+ //
+ this.lbl_aEnc.AutoSize = true;
+ this.lbl_aEnc.Location = new System.Drawing.Point(285, 85);
+ this.lbl_aEnc.Name = "lbl_aEnc";
+ this.lbl_aEnc.Size = new System.Drawing.Size(12, 13);
+ this.lbl_aEnc.TabIndex = 57;
+ this.lbl_aEnc.Text = "-";
+ //
+ // lbl_chapt
+ //
+ this.lbl_chapt.AutoSize = true;
+ this.lbl_chapt.Location = new System.Drawing.Point(175, 84);
+ this.lbl_chapt.Name = "lbl_chapt";
+ this.lbl_chapt.Size = new System.Drawing.Size(12, 13);
+ this.lbl_chapt.TabIndex = 59;
+ this.lbl_chapt.Text = "-";
+ //
+ // lbl_title
+ //
+ this.lbl_title.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
+ this.lbl_title.AutoSize = true;
+ this.lbl_title.Location = new System.Drawing.Point(175, 71);
+ this.lbl_title.Name = "lbl_title";
+ this.lbl_title.Size = new System.Drawing.Size(12, 13);
+ this.lbl_title.TabIndex = 58;
+ this.lbl_title.Text = "-";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label4.Location = new System.Drawing.Point(10, 261);
+ this.label4.Location = new System.Drawing.Point(232, 72);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(97, 13);
- this.label4.TabIndex = 45;
- this.label4.Text = "Modify Query:";
- //
- // btn_updateQuery
- //
- this.btn_updateQuery.BackColor = System.Drawing.SystemColors.ControlLight;
- this.btn_updateQuery.FlatAppearance.BorderColor = System.Drawing.Color.Black;
- this.btn_updateQuery.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_updateQuery.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_updateQuery.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_updateQuery.Location = new System.Drawing.Point(649, 257);
- this.btn_updateQuery.Name = "btn_updateQuery";
- this.btn_updateQuery.Size = new System.Drawing.Size(64, 23);
- this.btn_updateQuery.TabIndex = 46;
- this.btn_updateQuery.TabStop = false;
- this.btn_updateQuery.Text = "Update";
- this.btn_updateQuery.UseVisualStyleBackColor = false;
- this.btn_updateQuery.Click += new System.EventHandler(this.btn_updateQuery_Click);
- //
- // groupBox1
- //
- this.groupBox1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.groupBox1.Location = new System.Drawing.Point(14, 285);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(700, 10);
- this.groupBox1.TabIndex = 47;
- this.groupBox1.TabStop = false;
+ this.label4.Size = new System.Drawing.Size(47, 26);
+ this.label4.TabIndex = 60;
+ this.label4.Text = "Video:\r\nAudo:";
+ //
+ // txt_editQuery
+ //
+ this.txt_editQuery.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.txt_editQuery.Location = new System.Drawing.Point(222, 269);
+ this.txt_editQuery.Name = "txt_editQuery";
+ this.txt_editQuery.Size = new System.Drawing.Size(427, 21);
+ this.txt_editQuery.TabIndex = 61;
+ //
+ // btn_update
+ //
+ this.btn_update.BackColor = System.Drawing.SystemColors.ControlLight;
+ this.btn_update.FlatAppearance.BorderColor = System.Drawing.Color.Black;
+ this.btn_update.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_update.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btn_update.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
+ this.btn_update.Location = new System.Drawing.Point(655, 268);
+ this.btn_update.Name = "btn_update";
+ this.btn_update.Size = new System.Drawing.Size(64, 22);
+ this.btn_update.TabIndex = 62;
+ this.btn_update.TabStop = false;
+ this.btn_update.Text = "Update";
+ this.btn_update.UseVisualStyleBackColor = false;
+ this.btn_update.Click += new System.EventHandler(this.btn_update_Click);
//
// frmQueue
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.BackColor = System.Drawing.SystemColors.ControlLight;
- this.ClientSize = new System.Drawing.Size(736, 377);
- this.Controls.Add(this.list_queue);
- this.Controls.Add(this.btn_updateQuery);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.btn_delete);
- this.Controls.Add(this.lbl_status);
+ this.ClientSize = new System.Drawing.Size(729, 371);
+ this.Controls.Add(this.btn_update);
+ this.Controls.Add(this.txt_editQuery);
this.Controls.Add(this.label4);
- this.Controls.Add(this.btn_cancel);
- this.Controls.Add(this.btn_up);
+ this.Controls.Add(this.lbl_chapt);
+ this.Controls.Add(this.lbl_title);
+ this.Controls.Add(this.lbl_aEnc);
+ this.Controls.Add(this.lbl_vEnc);
+ this.Controls.Add(this.lbl_dest);
+ this.Controls.Add(this.lbl_source);
this.Controls.Add(this.label1);
- this.Controls.Add(this.text_edit);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.btn_down);
- this.Controls.Add(this.pictureBox1);
+ this.Controls.Add(this.lbl_status);
+ this.Controls.Add(this.btn_cancel);
this.Controls.Add(this.lbl_progressValue);
this.Controls.Add(this.label2);
this.Controls.Add(this.progressBar);
this.Controls.Add(this.btn_q_encoder);
this.Controls.Add(this.btn_Close);
+ this.Controls.Add(this.btn_delete);
+ this.Controls.Add(this.btn_up);
+ this.Controls.Add(this.btn_down);
+ this.Controls.Add(this.listview_queue);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.pictureBox1);
+ this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.MaximizeBox = false;
this.Name = "frmQueue";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "Encode Queue";
+ this.Text = "Queue";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -310,24 +370,29 @@ namespace Handbrake
#endregion
- internal System.Windows.Forms.Button btn_down;
- internal System.Windows.Forms.Button btn_up;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.PictureBox pictureBox1;
+ private System.Windows.Forms.ColumnHeader c_job;
+ public System.Windows.Forms.ListView listview_queue;
internal System.Windows.Forms.Button btn_delete;
+ internal System.Windows.Forms.Button btn_up;
+ internal System.Windows.Forms.Button btn_down;
+ private System.Windows.Forms.Label lbl_status;
+ internal System.Windows.Forms.Button btn_cancel;
+ private System.Windows.Forms.Label lbl_progressValue;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.ProgressBar progressBar;
internal System.Windows.Forms.Button btn_q_encoder;
internal System.Windows.Forms.Button btn_Close;
- private System.Windows.Forms.ProgressBar progressBar;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label lbl_progressValue;
- private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Label label3;
- internal System.Windows.Forms.Button btn_cancel;
- private System.Windows.Forms.Label lbl_status;
- private System.Windows.Forms.ToolTip toolTip1;
- public System.Windows.Forms.ListBox list_queue;
- private System.Windows.Forms.TextBox text_edit;
+ private System.Windows.Forms.Label lbl_source;
+ private System.Windows.Forms.Label lbl_dest;
+ private System.Windows.Forms.Label lbl_vEnc;
+ private System.Windows.Forms.Label lbl_aEnc;
+ private System.Windows.Forms.Label lbl_chapt;
+ private System.Windows.Forms.Label lbl_title;
private System.Windows.Forms.Label label4;
- internal System.Windows.Forms.Button btn_updateQuery;
- private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.TextBox txt_editQuery;
+ internal System.Windows.Forms.Button btn_update;
}
} \ No newline at end of file
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index eaa8904b1..4ffa628ba 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -13,45 +13,59 @@ namespace Handbrake
{
public partial class frmQueue : Form
{
+ // Declarations
private delegate void ProgressUpdateHandler();
+ private delegate void getQueueItem();
+ private delegate void setEncoding();
+ private delegate void modifyQueue();
+ // Everything starts Here
public frmQueue()
{
InitializeComponent();
}
- #region Queue Handling
+ #region encode queue Handlnig
+
+ // Declarations
Boolean cancel = false;
+ string foundQuery = "";
+ [DllImport("user32.dll")]
+ public static extern void LockWorkStation();
+ [DllImport("user32.dll")]
+ public static extern int ExitWindowsEx(int uFlags, int dwReason);
+
+ // Methods
private void btn_q_encoder_Click(object sender, EventArgs e)
{
// Reset some values
-
+
lbl_status.Visible = false;
cancel = false;
// Start the encode
try
{
- if (list_queue.Items.Count != 0)
+ if (listview_queue.Items.Count != 0)
{
// Setup or reset some values
btn_cancel.Visible = true;
progressBar.Value = 0;
lbl_progressValue.Text = "0 %";
- progressBar.Step = 100 / list_queue.Items.Count;
+ progressBar.Step = 100 / listview_queue.Items.Count;
progressBar.Update();
//ThreadPool.QueueUserWorkItem(startProc);
// Testing a new way of launching a thread. Hopefully will fix a random freeze up of the main thread.
Thread theQ = new Thread(startProc);
theQ.Start();
- }
+ }
}
catch (Exception exc)
{
MessageBox.Show(exc.ToString());
}
-
}
+
private void btn_cancel_Click(object sender, EventArgs e)
{
cancel = true;
@@ -59,21 +73,18 @@ namespace Handbrake
MessageBox.Show("No further items on the queue will start. The current encode process will continue until it is finished. \nClick 'Encode Video' when you wish to continue encoding the queue.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
- [DllImport("user32.dll")]
- public static extern void LockWorkStation();
- [DllImport("user32.dll")]
- public static extern int ExitWindowsEx(int uFlags, int dwReason);
-
private void startProc(object state)
{
try
{
- while (list_queue.Items.Count != 0)
+ while (listview_queue.Items.Count != 0)
{
- string query = list_queue.Items[0].ToString();
-
+ getItem();
+ string query = foundQuery;
+ query = query.Replace("ListViewItem: { ", "").Replace(" }", "").Trim();
updateUIElements();
-
+ setEncValue();
+
Functions.CLI process = new Functions.CLI();
Process hbProc = process.runCli(this, query, false, false, false, false);
@@ -87,11 +98,10 @@ namespace Handbrake
{
break;
}
-
+
}
resetQueue();
-
// Do something whent he encode ends.
switch (Properties.Settings.Default.CompletionOption)
@@ -124,6 +134,72 @@ namespace Handbrake
}
}
+ private void getItem()
+ {
+ try
+ {
+ if (this.InvokeRequired)
+ {
+ this.BeginInvoke(new getQueueItem(getItem));
+ }
+ foundQuery = this.listview_queue.Items[0].ToString();
+ }
+ catch (Exception)
+ {
+ // Do Nothing
+ }
+ }
+
+ private void setEncValue()
+ {
+ try
+ {
+ if (this.InvokeRequired)
+ {
+ this.BeginInvoke(new setEncoding(setEncValue));
+ }
+
+ string query = null;
+ ListView.SelectedListViewItemCollection name = null;
+ name = listview_queue.SelectedItems;
+
+ if (listview_queue.SelectedItems.Count != 0)
+ query = name[0].SubItems[0].Text;
+
+ // found query is a global varible
+ Functions.QueryParser parsed = Functions.QueryParser.Parse(foundQuery);
+ lbl_source.Text = parsed.Source;
+ lbl_dest.Text = parsed.Destination;
+
+
+ if (parsed.DVDTitle == 0)
+ lbl_title.Text = "Auto";
+ else
+ lbl_title.Text = parsed.DVDTitle.ToString();
+
+ string chatpers = "";
+ if (parsed.DVDChapterStart == 0)
+ {
+ lbl_chapt.Text = "Auto";
+ }
+ else
+ {
+ chatpers = parsed.DVDChapterStart.ToString();
+ if (parsed.DVDChapterFinish != 0)
+ chatpers = chatpers + " - " + parsed.DVDChapterFinish;
+ lbl_chapt.Text = parsed.DVDChapterStart + chatpers;
+ }
+
+ lbl_vEnc.Text = parsed.VideoEncoder;
+ lbl_aEnc.Text = parsed.AudioEncoder;
+ }
+ catch (Exception)
+ {
+ // Do Nothing
+ }
+
+ }
+
private void updateUIElements()
{
try
@@ -133,7 +209,7 @@ namespace Handbrake
this.BeginInvoke(new ProgressUpdateHandler(updateUIElements));
return;
}
- this.list_queue.Items.RemoveAt(0);
+ this.listview_queue.Items.RemoveAt(0);
progressBar.PerformStep();
lbl_progressValue.Text = string.Format("{0} %", progressBar.Value);
@@ -159,19 +235,24 @@ namespace Handbrake
{
lbl_status.Visible = true;
lbl_status.Text = "Encode Queue Cancelled!";
- text_edit.Text = "";
}
else
{
lbl_status.Visible = true;
lbl_status.Text = "Encode Queue Completed!";
- text_edit.Text = "";
}
btn_cancel.Visible = false;
lbl_progressValue.Text = "0 %";
progressBar.Value = 0;
progressBar.Update();
+
+ lbl_source.Text = "-";
+ lbl_dest.Text = "-";
+ lbl_vEnc.Text = "-";
+ lbl_aEnc.Text = "-";
+ lbl_title.Text = "-";
+ lbl_chapt.Text = "-";
}
catch (Exception exc)
{
@@ -184,83 +265,138 @@ namespace Handbrake
#region Queue Management
private void btn_up_Click(object sender, EventArgs e)
{
- int count = list_queue.Items.Count;
- int itemToMove = list_queue.SelectedIndex;
- int previousItemint = 0;
- String previousItem = "";
-
- if (itemToMove > 0)
+ string cache;
+ int selIdx;
+ if (listview_queue.Items.Count != 0)
{
- previousItemint = itemToMove - 1;
- previousItem = list_queue.Items[previousItemint].ToString();
- list_queue.Items[previousItemint] = list_queue.Items[itemToMove];
- list_queue.Items[itemToMove] = previousItem;
- list_queue.SelectedIndex = list_queue.SelectedIndex - 1;
+ selIdx = listview_queue.SelectedItems[0].Index;
+ // ignore moveup of row(0)
+ if (selIdx == 0)
+ return;
+
+ // move the subitems for the previous row
+ // to cache to make room for the selected row
+ for (int i = 0; i < listview_queue.Items[selIdx].SubItems.Count; i++)
+ {
+ cache = listview_queue.Items[selIdx - 1].SubItems[i].Text;
+ listview_queue.Items[selIdx - 1].SubItems[i].Text =
+ listview_queue.Items[selIdx].SubItems[i].Text;
+ listview_queue.Items[selIdx].SubItems[i].Text = cache;
+ }
+ listview_queue.Items[selIdx - 1].Selected = true;
+ listview_queue.Refresh();
+ listview_queue.Focus();
}
}
private void btn_down_Click(object sender, EventArgs e)
{
- int count = list_queue.Items.Count;
- int itemToMove = list_queue.SelectedIndex;
- int itemAfterInt = 0;
- String itemAfter = "";
-
- if (itemToMove < (count - 1))
+ string cache;
+ int selIdx;
+
+ if (listview_queue.Items.Count != 0)
{
- itemAfterInt = itemToMove + 1;
- itemAfter = list_queue.Items[itemAfterInt].ToString();
- list_queue.Items[itemAfterInt] = list_queue.Items[itemToMove];
- list_queue.Items[itemToMove] = itemAfter;
- list_queue.SelectedIndex = list_queue.SelectedIndex + 1;
+ selIdx = listview_queue.SelectedItems[0].Index;
+
+ // ignore movedown of last item
+ if (selIdx == listview_queue.Items.Count - 1)
+ return;
+ // move the subitems for the next row
+ // to cache so we can move the selected row down
+ for (int i = 0; i < listview_queue.Items[selIdx].SubItems.Count; i++)
+ {
+ cache = listview_queue.Items[selIdx + 1].SubItems[i].Text;
+ listview_queue.Items[selIdx + 1].SubItems[i].Text =
+ listview_queue.Items[selIdx].SubItems[i].Text;
+ listview_queue.Items[selIdx].SubItems[i].Text = cache;
+ }
+ listview_queue.Items[selIdx + 1].Selected = true;
+ listview_queue.Refresh();
+ listview_queue.Focus();
}
}
private void btn_delete_Click(object sender, EventArgs e)
{
- list_queue.Items.Remove(list_queue.SelectedItem);
+ for (int i = listview_queue.SelectedItems.Count - 1; i >= 0; i--)
+ {
+ ListViewItem item = listview_queue.SelectedItems[i];
+ listview_queue.Items.Remove(item);
+ }
}
#endregion
- #region Queue Item Modification
+ #region Modify Queue
int listCount = 0;
+ private void listview_queue_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ modQ();
+ listCount = listview_queue.Items.Count;
+ }
- private void btn_updateQuery_Click(object sender, EventArgs e)
+ private void modQ()
{
- if (text_edit.Text != "")
+ try
{
- if (list_queue.Items.Count != listCount)
- {
- MessageBox.Show("Unable to modify the selected item. The number of items on the list has changed. \nPlease avoid modifying an item when a new encode is about to start!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- }
- else
+ if (this.InvokeRequired)
{
- if (list_queue.SelectedItem != null)
- list_queue.Items[list_queue.SelectedIndex] = text_edit.Text;
+ this.BeginInvoke(new modifyQueue(modQ));
}
+
+ string query = null;
+ ListView.SelectedListViewItemCollection name = null;
+ name = listview_queue.SelectedItems;
+
+ if (listview_queue.SelectedItems.Count != 0)
+ query = name[0].SubItems[0].Text;
+
+ txt_editQuery.Text = query;
+
+ }
+ catch (Exception)
+ {
}
}
- private void list_queue_SelectedIndexChanged(object sender, EventArgs e)
+ private void btn_update_Click(object sender, EventArgs e)
{
- if (list_queue.SelectedItem != null)
- text_edit.Text = list_queue.SelectedItem.ToString();
-
- listCount = list_queue.Items.Count;
+ try
+ {
+ if (txt_editQuery.Text != "")
+ {
+ if (listview_queue.Items.Count != listCount)
+ {
+ MessageBox.Show("Unable to modify the selected item. The number of items on the list has changed. \nPlease avoid modifying an item when a new encode is about to start!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ else
+ {
+ if (listview_queue.SelectedItems != null)
+ {
+ int selectItm = listview_queue.SelectedIndices[0];
+ listview_queue.Items[selectItm].Text = txt_editQuery.Text;
+ }
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ MessageBox.Show(exc.ToString());
+ }
}
+
#endregion
- private void btn_Close_Click(object sender, EventArgs e)
+ protected override void OnClosing(CancelEventArgs e)
{
+ e.Cancel = true;
this.Hide();
+ base.OnClosing(e);
}
- protected override void OnClosing(CancelEventArgs e)
+ private void btn_Close_Click(object sender, EventArgs e)
{
- e.Cancel = true;
this.Hide();
- base.OnClosing(e);
}
}
diff --git a/win/C#/frmQueue.resx b/win/C#/frmQueue.resx
index 2ddcb6921..37f92905a 100644
--- a/win/C#/frmQueue.resx
+++ b/win/C#/frmQueue.resx
@@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>