OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Mon, 19 Nov 2007 17:15:56 +0000 (17:15 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Mon, 19 Nov 2007 17:15:56 +0000 (17:15 +0000)
- Reverted Queue listview to listbox. Listview had a character limitation that could not be worked around.

git-svn-id: svn://localhost/HandBrake/trunk@1068 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/frmQueue.Designer.cs
win/C#/frmQueue.cs
win/C#/frmQueue.resx

index 7f1394f..6098553 100644 (file)
@@ -28,105 +28,35 @@ namespace Handbrake
         /// </summary>\r
         private void InitializeComponent()\r
         {\r
+            this.components = new System.ComponentModel.Container();\r
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmQueue));\r
-            this.label3 = new System.Windows.Forms.Label();\r
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();\r
-            this.listview_queue = new System.Windows.Forms.ListView();\r
-            this.c_job = new System.Windows.Forms.ColumnHeader();\r
-            this.btn_delete = new System.Windows.Forms.Button();\r
-            this.btn_up = new System.Windows.Forms.Button();\r
             this.btn_down = new System.Windows.Forms.Button();\r
-            this.lbl_status = new System.Windows.Forms.Label();\r
-            this.btn_cancel = new System.Windows.Forms.Button();\r
-            this.lbl_progressValue = new System.Windows.Forms.Label();\r
-            this.label2 = new System.Windows.Forms.Label();\r
-            this.progressBar = new System.Windows.Forms.ProgressBar();\r
+            this.btn_up = new System.Windows.Forms.Button();\r
+            this.btn_delete = new System.Windows.Forms.Button();\r
             this.btn_q_encoder = new System.Windows.Forms.Button();\r
+            this.list_queue = new System.Windows.Forms.ListBox();\r
             this.btn_Close = new System.Windows.Forms.Button();\r
-            this.label1 = new System.Windows.Forms.Label();\r
-            this.lbl_source = new System.Windows.Forms.Label();\r
-            this.lbl_dest = new System.Windows.Forms.Label();\r
-            this.lbl_vEnc = new System.Windows.Forms.Label();\r
-            this.lbl_aEnc = new System.Windows.Forms.Label();\r
+            this.progressBar = new System.Windows.Forms.ProgressBar();\r
+            this.label2 = new System.Windows.Forms.Label();\r
+            this.lbl_progressValue = new System.Windows.Forms.Label();\r
+            this.btn_cancel = new System.Windows.Forms.Button();\r
+            this.lbl_status = new System.Windows.Forms.Label();\r
+            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);\r
+            this.text_edit = new System.Windows.Forms.TextBox();\r
+            this.btn_updateQuery = new System.Windows.Forms.Button();\r
+            this.label4 = new System.Windows.Forms.Label();\r
             this.lbl_chapt = new System.Windows.Forms.Label();\r
             this.lbl_title = new System.Windows.Forms.Label();\r
-            this.label4 = new System.Windows.Forms.Label();\r
-            this.txt_editQuery = new System.Windows.Forms.TextBox();\r
-            this.btn_update = new System.Windows.Forms.Button();\r
+            this.lbl_aEnc = new System.Windows.Forms.Label();\r
+            this.lbl_vEnc = new System.Windows.Forms.Label();\r
+            this.lbl_dest = new System.Windows.Forms.Label();\r
+            this.lbl_source = new System.Windows.Forms.Label();\r
+            this.label1 = new System.Windows.Forms.Label();\r
+            this.label3 = new System.Windows.Forms.Label();\r
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();\r
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();\r
             this.SuspendLayout();\r
             // \r
-            // label3\r
-            // \r
-            this.label3.AutoSize = true;\r
-            this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label3.Location = new System.Drawing.Point(50, 24);\r
-            this.label3.Name = "label3";\r
-            this.label3.Size = new System.Drawing.Size(82, 13);\r
-            this.label3.TabIndex = 41;\r
-            this.label3.Text = "Current Job";\r
-            // \r
-            // pictureBox1\r
-            // \r
-            this.pictureBox1.Image = global::Handbrake.Properties.Resources.Queue;\r
-            this.pictureBox1.Location = new System.Drawing.Point(12, 12);\r
-            this.pictureBox1.Name = "pictureBox1";\r
-            this.pictureBox1.Size = new System.Drawing.Size(32, 32);\r
-            this.pictureBox1.TabIndex = 40;\r
-            this.pictureBox1.TabStop = false;\r
-            // \r
-            // listview_queue\r
-            // \r
-            this.listview_queue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
-            this.listview_queue.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {\r
-            this.c_job});\r
-            this.listview_queue.Location = new System.Drawing.Point(12, 116);\r
-            this.listview_queue.MultiSelect = false;\r
-            this.listview_queue.Name = "listview_queue";\r
-            this.listview_queue.ShowItemToolTips = true;\r
-            this.listview_queue.Size = new System.Drawing.Size(707, 146);\r
-            this.listview_queue.TabIndex = 42;\r
-            this.listview_queue.UseCompatibleStateImageBehavior = false;\r
-            this.listview_queue.View = System.Windows.Forms.View.Details;\r
-            this.listview_queue.SelectedIndexChanged += new System.EventHandler(this.listview_queue_SelectedIndexChanged);\r
-            // \r
-            // c_job\r
-            // \r
-            this.c_job.Text = "Job";\r
-            this.c_job.Width = 721;\r
-            // \r
-            // btn_delete\r
-            // \r
-            this.btn_delete.BackColor = System.Drawing.SystemColors.ControlLight;\r
-            this.btn_delete.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
-            this.btn_delete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
-            this.btn_delete.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.btn_delete.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_delete.Location = new System.Drawing.Point(152, 268);\r
-            this.btn_delete.Name = "btn_delete";\r
-            this.btn_delete.Size = new System.Drawing.Size(64, 22);\r
-            this.btn_delete.TabIndex = 43;\r
-            this.btn_delete.TabStop = false;\r
-            this.btn_delete.Text = "Delete";\r
-            this.btn_delete.UseVisualStyleBackColor = false;\r
-            this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click);\r
-            // \r
-            // btn_up\r
-            // \r
-            this.btn_up.BackColor = System.Drawing.SystemColors.ControlLight;\r
-            this.btn_up.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
-            this.btn_up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
-            this.btn_up.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.btn_up.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_up.Location = new System.Drawing.Point(12, 268);\r
-            this.btn_up.Name = "btn_up";\r
-            this.btn_up.Size = new System.Drawing.Size(64, 22);\r
-            this.btn_up.TabIndex = 44;\r
-            this.btn_up.TabStop = false;\r
-            this.btn_up.Text = "Up";\r
-            this.btn_up.UseVisualStyleBackColor = false;\r
-            this.btn_up.Click += new System.EventHandler(this.btn_up_Click);\r
-            // \r
             // btn_down\r
             // \r
             this.btn_down.BackColor = System.Drawing.SystemColors.ControlLight;\r
@@ -134,69 +64,46 @@ namespace Handbrake
             this.btn_down.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
             this.btn_down.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.btn_down.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_down.Location = new System.Drawing.Point(82, 268);\r
+            this.btn_down.Location = new System.Drawing.Point(74, 274);\r
             this.btn_down.Name = "btn_down";\r
             this.btn_down.Size = new System.Drawing.Size(64, 22);\r
-            this.btn_down.TabIndex = 45;\r
+            this.btn_down.TabIndex = 33;\r
             this.btn_down.TabStop = false;\r
             this.btn_down.Text = "Down";\r
             this.btn_down.UseVisualStyleBackColor = false;\r
             this.btn_down.Click += new System.EventHandler(this.btn_down_Click);\r
             // \r
-            // lbl_status\r
-            // \r
-            this.lbl_status.AutoSize = true;\r
-            this.lbl_status.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.lbl_status.Location = new System.Drawing.Point(273, 304);\r
-            this.lbl_status.Name = "lbl_status";\r
-            this.lbl_status.Size = new System.Drawing.Size(176, 13);\r
-            this.lbl_status.TabIndex = 52;\r
-            this.lbl_status.Text = "Encode Queue Completed!";\r
-            this.lbl_status.Visible = false;\r
-            // \r
-            // btn_cancel\r
-            // \r
-            this.btn_cancel.BackColor = System.Drawing.SystemColors.ControlLight;\r
-            this.btn_cancel.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
-            this.btn_cancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
-            this.btn_cancel.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.btn_cancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_cancel.Location = new System.Drawing.Point(142, 336);\r
-            this.btn_cancel.Name = "btn_cancel";\r
-            this.btn_cancel.Size = new System.Drawing.Size(91, 22);\r
-            this.btn_cancel.TabIndex = 51;\r
-            this.btn_cancel.TabStop = false;\r
-            this.btn_cancel.Text = "Stop Queue";\r
-            this.btn_cancel.UseVisualStyleBackColor = false;\r
-            this.btn_cancel.Visible = false;\r
-            this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);\r
-            // \r
-            // lbl_progressValue\r
-            // \r
-            this.lbl_progressValue.AutoSize = true;\r
-            this.lbl_progressValue.Location = new System.Drawing.Point(689, 304);\r
-            this.lbl_progressValue.Name = "lbl_progressValue";\r
-            this.lbl_progressValue.Size = new System.Drawing.Size(30, 13);\r
-            this.lbl_progressValue.TabIndex = 50;\r
-            this.lbl_progressValue.Text = "0 %";\r
-            // \r
-            // label2\r
+            // btn_up\r
             // \r
-            this.label2.AutoSize = true;\r
-            this.label2.Location = new System.Drawing.Point(9, 304);\r
-            this.label2.Name = "label2";\r
-            this.label2.Size = new System.Drawing.Size(62, 13);\r
-            this.label2.TabIndex = 49;\r
-            this.label2.Text = "Progress:";\r
+            this.btn_up.BackColor = System.Drawing.SystemColors.ControlLight;\r
+            this.btn_up.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.btn_up.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_up.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_up.Location = new System.Drawing.Point(13, 274);\r
+            this.btn_up.Name = "btn_up";\r
+            this.btn_up.Size = new System.Drawing.Size(55, 22);\r
+            this.btn_up.TabIndex = 32;\r
+            this.btn_up.TabStop = false;\r
+            this.btn_up.Text = "Up";\r
+            this.btn_up.UseVisualStyleBackColor = false;\r
+            this.btn_up.Click += new System.EventHandler(this.btn_up_Click);\r
             // \r
-            // progressBar\r
+            // btn_delete\r
             // \r
-            this.progressBar.BackColor = System.Drawing.SystemColors.ControlLight;\r
-            this.progressBar.Location = new System.Drawing.Point(75, 299);\r
-            this.progressBar.Name = "progressBar";\r
-            this.progressBar.Size = new System.Drawing.Size(608, 23);\r
-            this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;\r
-            this.progressBar.TabIndex = 48;\r
+            this.btn_delete.BackColor = System.Drawing.SystemColors.ControlLight;\r
+            this.btn_delete.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_delete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.btn_delete.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_delete.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_delete.Location = new System.Drawing.Point(144, 274);\r
+            this.btn_delete.Name = "btn_delete";\r
+            this.btn_delete.Size = new System.Drawing.Size(64, 22);\r
+            this.btn_delete.TabIndex = 31;\r
+            this.btn_delete.TabStop = false;\r
+            this.btn_delete.Text = "Delete";\r
+            this.btn_delete.UseVisualStyleBackColor = false;\r
+            this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click);\r
             // \r
             // btn_q_encoder\r
             // \r
@@ -205,15 +112,26 @@ namespace Handbrake
             this.btn_q_encoder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
             this.btn_q_encoder.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.btn_q_encoder.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_q_encoder.Location = new System.Drawing.Point(11, 336);\r
+            this.btn_q_encoder.Location = new System.Drawing.Point(12, 345);\r
             this.btn_q_encoder.Name = "btn_q_encoder";\r
             this.btn_q_encoder.Size = new System.Drawing.Size(124, 22);\r
-            this.btn_q_encoder.TabIndex = 47;\r
+            this.btn_q_encoder.TabIndex = 29;\r
             this.btn_q_encoder.TabStop = false;\r
             this.btn_q_encoder.Text = "Encode Video(s)";\r
             this.btn_q_encoder.UseVisualStyleBackColor = false;\r
             this.btn_q_encoder.Click += new System.EventHandler(this.btn_q_encoder_Click);\r
             // \r
+            // list_queue\r
+            // \r
+            this.list_queue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
+            this.list_queue.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.list_queue.HorizontalScrollbar = true;\r
+            this.list_queue.Location = new System.Drawing.Point(12, 110);\r
+            this.list_queue.Name = "list_queue";\r
+            this.list_queue.Size = new System.Drawing.Size(701, 158);\r
+            this.list_queue.TabIndex = 28;\r
+            this.list_queue.SelectedIndexChanged += new System.EventHandler(this.list_queue_SelectedIndexChanged);\r
+            // \r
             // btn_Close\r
             // \r
             this.btn_Close.BackColor = System.Drawing.SystemColors.ControlLight;\r
@@ -221,69 +139,115 @@ namespace Handbrake
             this.btn_Close.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
             this.btn_Close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.btn_Close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_Close.Location = new System.Drawing.Point(605, 336);\r
+            this.btn_Close.Location = new System.Drawing.Point(606, 345);\r
             this.btn_Close.Name = "btn_Close";\r
             this.btn_Close.Size = new System.Drawing.Size(108, 22);\r
-            this.btn_Close.TabIndex = 46;\r
+            this.btn_Close.TabIndex = 27;\r
             this.btn_Close.TabStop = false;\r
             this.btn_Close.Text = "Close Window";\r
             this.btn_Close.UseVisualStyleBackColor = false;\r
             this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);\r
             // \r
-            // label1\r
+            // progressBar\r
             // \r
-            this.label1.AutoSize = true;\r
-            this.label1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label1.Location = new System.Drawing.Point(50, 46);\r
-            this.label1.Name = "label1";\r
-            this.label1.Size = new System.Drawing.Size(99, 52);\r
-            this.label1.TabIndex = 53;\r
-            this.label1.Text = "Source:\r\nDestination:\r\nDVD Title:\r\nDVD Chapters:";\r
+            this.progressBar.BackColor = System.Drawing.SystemColors.ControlLight;\r
+            this.progressBar.Location = new System.Drawing.Point(67, 307);\r
+            this.progressBar.Name = "progressBar";\r
+            this.progressBar.Size = new System.Drawing.Size(608, 23);\r
+            this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;\r
+            this.progressBar.TabIndex = 34;\r
             // \r
-            // lbl_source\r
+            // label2\r
             // \r
-            this.lbl_source.AutoSize = true;\r
-            this.lbl_source.Location = new System.Drawing.Point(175, 46);\r
-            this.lbl_source.Name = "lbl_source";\r
-            this.lbl_source.Size = new System.Drawing.Size(12, 13);\r
-            this.lbl_source.TabIndex = 54;\r
-            this.lbl_source.Text = "-";\r
+            this.label2.AutoSize = true;\r
+            this.label2.Location = new System.Drawing.Point(10, 313);\r
+            this.label2.Name = "label2";\r
+            this.label2.Size = new System.Drawing.Size(51, 13);\r
+            this.label2.TabIndex = 35;\r
+            this.label2.Text = "Progress:";\r
             // \r
-            // lbl_dest\r
+            // lbl_progressValue\r
             // \r
-            this.lbl_dest.AutoSize = true;\r
-            this.lbl_dest.Location = new System.Drawing.Point(175, 59);\r
-            this.lbl_dest.Name = "lbl_dest";\r
-            this.lbl_dest.Size = new System.Drawing.Size(12, 13);\r
-            this.lbl_dest.TabIndex = 55;\r
-            this.lbl_dest.Text = "-";\r
-            this.lbl_dest.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\r
+            this.lbl_progressValue.AutoSize = true;\r
+            this.lbl_progressValue.Location = new System.Drawing.Point(690, 313);\r
+            this.lbl_progressValue.Name = "lbl_progressValue";\r
+            this.lbl_progressValue.Size = new System.Drawing.Size(24, 13);\r
+            this.lbl_progressValue.TabIndex = 36;\r
+            this.lbl_progressValue.Text = "0 %";\r
             // \r
-            // lbl_vEnc\r
+            // btn_cancel\r
             // \r
-            this.lbl_vEnc.AutoSize = true;\r
-            this.lbl_vEnc.Location = new System.Drawing.Point(285, 72);\r
-            this.lbl_vEnc.Name = "lbl_vEnc";\r
-            this.lbl_vEnc.Size = new System.Drawing.Size(12, 13);\r
-            this.lbl_vEnc.TabIndex = 56;\r
-            this.lbl_vEnc.Text = "-";\r
+            this.btn_cancel.BackColor = System.Drawing.SystemColors.ControlLight;\r
+            this.btn_cancel.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_cancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.btn_cancel.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_cancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_cancel.Location = new System.Drawing.Point(143, 345);\r
+            this.btn_cancel.Name = "btn_cancel";\r
+            this.btn_cancel.Size = new System.Drawing.Size(91, 22);\r
+            this.btn_cancel.TabIndex = 41;\r
+            this.btn_cancel.TabStop = false;\r
+            this.btn_cancel.Text = "Stop Queue";\r
+            this.toolTip1.SetToolTip(this.btn_cancel, "This will prevent any more encode processes from starting. It will not stop the c" +\r
+                    "urrent process!");\r
+            this.btn_cancel.UseVisualStyleBackColor = false;\r
+            this.btn_cancel.Visible = false;\r
+            this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);\r
             // \r
-            // lbl_aEnc\r
+            // lbl_status\r
             // \r
-            this.lbl_aEnc.AutoSize = true;\r
-            this.lbl_aEnc.Location = new System.Drawing.Point(285, 85);\r
-            this.lbl_aEnc.Name = "lbl_aEnc";\r
-            this.lbl_aEnc.Size = new System.Drawing.Size(12, 13);\r
-            this.lbl_aEnc.TabIndex = 57;\r
-            this.lbl_aEnc.Text = "-";\r
+            this.lbl_status.AutoSize = true;\r
+            this.lbl_status.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_status.Location = new System.Drawing.Point(274, 313);\r
+            this.lbl_status.Name = "lbl_status";\r
+            this.lbl_status.Size = new System.Drawing.Size(176, 13);\r
+            this.lbl_status.TabIndex = 42;\r
+            this.lbl_status.Text = "Encode Queue Completed!";\r
+            this.lbl_status.Visible = false;\r
+            // \r
+            // text_edit\r
+            // \r
+            this.text_edit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
+            this.text_edit.Location = new System.Drawing.Point(214, 275);\r
+            this.text_edit.Name = "text_edit";\r
+            this.text_edit.Size = new System.Drawing.Size(430, 20);\r
+            this.text_edit.TabIndex = 43;\r
+            this.toolTip1.SetToolTip(this.text_edit, "Avoid using this feature when the encoder is about to start a new task. You may o" +\r
+                    "verwrite the wrong job");\r
+            // \r
+            // btn_updateQuery\r
+            // \r
+            this.btn_updateQuery.BackColor = System.Drawing.SystemColors.ControlLight;\r
+            this.btn_updateQuery.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_updateQuery.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.btn_updateQuery.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_updateQuery.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_updateQuery.Location = new System.Drawing.Point(650, 274);\r
+            this.btn_updateQuery.Name = "btn_updateQuery";\r
+            this.btn_updateQuery.Size = new System.Drawing.Size(64, 23);\r
+            this.btn_updateQuery.TabIndex = 46;\r
+            this.btn_updateQuery.TabStop = false;\r
+            this.btn_updateQuery.Text = "Update";\r
+            this.btn_updateQuery.UseVisualStyleBackColor = false;\r
+            this.btn_updateQuery.Click += new System.EventHandler(this.btn_updateQuery_Click);\r
+            // \r
+            // label4\r
+            // \r
+            this.label4.AutoSize = true;\r
+            this.label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label4.Location = new System.Drawing.Point(232, 72);\r
+            this.label4.Name = "label4";\r
+            this.label4.Size = new System.Drawing.Size(47, 26);\r
+            this.label4.TabIndex = 70;\r
+            this.label4.Text = "Video:\r\nAudo:";\r
             // \r
             // lbl_chapt\r
             // \r
             this.lbl_chapt.AutoSize = true;\r
             this.lbl_chapt.Location = new System.Drawing.Point(175, 84);\r
             this.lbl_chapt.Name = "lbl_chapt";\r
-            this.lbl_chapt.Size = new System.Drawing.Size(12, 13);\r
-            this.lbl_chapt.TabIndex = 59;\r
+            this.lbl_chapt.Size = new System.Drawing.Size(10, 13);\r
+            this.lbl_chapt.TabIndex = 69;\r
             this.lbl_chapt.Text = "-";\r
             // \r
             // lbl_title\r
@@ -292,51 +256,82 @@ namespace Handbrake
             this.lbl_title.AutoSize = true;\r
             this.lbl_title.Location = new System.Drawing.Point(175, 71);\r
             this.lbl_title.Name = "lbl_title";\r
-            this.lbl_title.Size = new System.Drawing.Size(12, 13);\r
-            this.lbl_title.TabIndex = 58;\r
+            this.lbl_title.Size = new System.Drawing.Size(10, 13);\r
+            this.lbl_title.TabIndex = 68;\r
             this.lbl_title.Text = "-";\r
             // \r
-            // label4\r
+            // lbl_aEnc\r
             // \r
-            this.label4.AutoSize = true;\r
-            this.label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label4.Location = new System.Drawing.Point(232, 72);\r
-            this.label4.Name = "label4";\r
-            this.label4.Size = new System.Drawing.Size(47, 26);\r
-            this.label4.TabIndex = 60;\r
-            this.label4.Text = "Video:\r\nAudo:";\r
+            this.lbl_aEnc.AutoSize = true;\r
+            this.lbl_aEnc.Location = new System.Drawing.Point(285, 85);\r
+            this.lbl_aEnc.Name = "lbl_aEnc";\r
+            this.lbl_aEnc.Size = new System.Drawing.Size(10, 13);\r
+            this.lbl_aEnc.TabIndex = 67;\r
+            this.lbl_aEnc.Text = "-";\r
+            // \r
+            // lbl_vEnc\r
+            // \r
+            this.lbl_vEnc.AutoSize = true;\r
+            this.lbl_vEnc.Location = new System.Drawing.Point(285, 72);\r
+            this.lbl_vEnc.Name = "lbl_vEnc";\r
+            this.lbl_vEnc.Size = new System.Drawing.Size(10, 13);\r
+            this.lbl_vEnc.TabIndex = 66;\r
+            this.lbl_vEnc.Text = "-";\r
+            // \r
+            // lbl_dest\r
             // \r
-            // txt_editQuery\r
-            // \r
-            this.txt_editQuery.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
-            this.txt_editQuery.Location = new System.Drawing.Point(222, 269);\r
-            this.txt_editQuery.Name = "txt_editQuery";\r
-            this.txt_editQuery.Size = new System.Drawing.Size(427, 21);\r
-            this.txt_editQuery.TabIndex = 61;\r
-            // \r
-            // btn_update\r
-            // \r
-            this.btn_update.BackColor = System.Drawing.SystemColors.ControlLight;\r
-            this.btn_update.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
-            this.btn_update.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
-            this.btn_update.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.btn_update.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_update.Location = new System.Drawing.Point(655, 268);\r
-            this.btn_update.Name = "btn_update";\r
-            this.btn_update.Size = new System.Drawing.Size(64, 22);\r
-            this.btn_update.TabIndex = 62;\r
-            this.btn_update.TabStop = false;\r
-            this.btn_update.Text = "Update";\r
-            this.btn_update.UseVisualStyleBackColor = false;\r
-            this.btn_update.Click += new System.EventHandler(this.btn_update_Click);\r
+            this.lbl_dest.AutoSize = true;\r
+            this.lbl_dest.Location = new System.Drawing.Point(175, 59);\r
+            this.lbl_dest.Name = "lbl_dest";\r
+            this.lbl_dest.Size = new System.Drawing.Size(10, 13);\r
+            this.lbl_dest.TabIndex = 65;\r
+            this.lbl_dest.Text = "-";\r
+            this.lbl_dest.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\r
+            // \r
+            // lbl_source\r
+            // \r
+            this.lbl_source.AutoSize = true;\r
+            this.lbl_source.Location = new System.Drawing.Point(175, 46);\r
+            this.lbl_source.Name = "lbl_source";\r
+            this.lbl_source.Size = new System.Drawing.Size(10, 13);\r
+            this.lbl_source.TabIndex = 64;\r
+            this.lbl_source.Text = "-";\r
+            // \r
+            // label1\r
+            // \r
+            this.label1.AutoSize = true;\r
+            this.label1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label1.Location = new System.Drawing.Point(50, 46);\r
+            this.label1.Name = "label1";\r
+            this.label1.Size = new System.Drawing.Size(99, 52);\r
+            this.label1.TabIndex = 63;\r
+            this.label1.Text = "Source:\r\nDestination:\r\nDVD Title:\r\nDVD Chapters:";\r
+            // \r
+            // label3\r
+            // \r
+            this.label3.AutoSize = true;\r
+            this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label3.Location = new System.Drawing.Point(50, 24);\r
+            this.label3.Name = "label3";\r
+            this.label3.Size = new System.Drawing.Size(82, 13);\r
+            this.label3.TabIndex = 62;\r
+            this.label3.Text = "Current Job";\r
+            // \r
+            // pictureBox1\r
+            // \r
+            this.pictureBox1.Image = global::Handbrake.Properties.Resources.Queue;\r
+            this.pictureBox1.Location = new System.Drawing.Point(12, 12);\r
+            this.pictureBox1.Name = "pictureBox1";\r
+            this.pictureBox1.Size = new System.Drawing.Size(32, 32);\r
+            this.pictureBox1.TabIndex = 61;\r
+            this.pictureBox1.TabStop = false;\r
             // \r
             // frmQueue\r
             // \r
-            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
-            this.ClientSize = new System.Drawing.Size(729, 371);\r
-            this.Controls.Add(this.btn_update);\r
-            this.Controls.Add(this.txt_editQuery);\r
+            this.BackColor = System.Drawing.SystemColors.ControlLight;\r
+            this.ClientSize = new System.Drawing.Size(729, 377);\r
             this.Controls.Add(this.label4);\r
             this.Controls.Add(this.lbl_chapt);\r
             this.Controls.Add(this.lbl_title);\r
@@ -345,23 +340,26 @@ namespace Handbrake
             this.Controls.Add(this.lbl_dest);\r
             this.Controls.Add(this.lbl_source);\r
             this.Controls.Add(this.label1);\r
+            this.Controls.Add(this.label3);\r
+            this.Controls.Add(this.pictureBox1);\r
+            this.Controls.Add(this.list_queue);\r
+            this.Controls.Add(this.btn_updateQuery);\r
+            this.Controls.Add(this.btn_delete);\r
             this.Controls.Add(this.lbl_status);\r
             this.Controls.Add(this.btn_cancel);\r
+            this.Controls.Add(this.btn_up);\r
+            this.Controls.Add(this.text_edit);\r
+            this.Controls.Add(this.btn_down);\r
             this.Controls.Add(this.lbl_progressValue);\r
             this.Controls.Add(this.label2);\r
             this.Controls.Add(this.progressBar);\r
             this.Controls.Add(this.btn_q_encoder);\r
             this.Controls.Add(this.btn_Close);\r
-            this.Controls.Add(this.btn_delete);\r
-            this.Controls.Add(this.btn_up);\r
-            this.Controls.Add(this.btn_down);\r
-            this.Controls.Add(this.listview_queue);\r
-            this.Controls.Add(this.label3);\r
-            this.Controls.Add(this.pictureBox1);\r
-            this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MaximizeBox = false;\r
             this.Name = "frmQueue";\r
-            this.Text = "Queue";\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
+            this.Text = "Encode Queue";\r
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();\r
             this.ResumeLayout(false);\r
             this.PerformLayout();\r
@@ -370,29 +368,29 @@ namespace Handbrake
 \r
         #endregion\r
 \r
-        private System.Windows.Forms.Label label3;\r
-        private System.Windows.Forms.PictureBox pictureBox1;\r
-        private System.Windows.Forms.ColumnHeader c_job;\r
-        public System.Windows.Forms.ListView listview_queue;\r
-        internal System.Windows.Forms.Button btn_delete;\r
-        internal System.Windows.Forms.Button btn_up;\r
         internal System.Windows.Forms.Button btn_down;\r
-        private System.Windows.Forms.Label lbl_status;\r
-        internal System.Windows.Forms.Button btn_cancel;\r
-        private System.Windows.Forms.Label lbl_progressValue;\r
-        private System.Windows.Forms.Label label2;\r
-        private System.Windows.Forms.ProgressBar progressBar;\r
+        internal System.Windows.Forms.Button btn_up;\r
+        internal System.Windows.Forms.Button btn_delete;\r
         internal System.Windows.Forms.Button btn_q_encoder;\r
         internal System.Windows.Forms.Button btn_Close;\r
-        private System.Windows.Forms.Label label1;\r
-        private System.Windows.Forms.Label lbl_source;\r
-        private System.Windows.Forms.Label lbl_dest;\r
-        private System.Windows.Forms.Label lbl_vEnc;\r
-        private System.Windows.Forms.Label lbl_aEnc;\r
+        private System.Windows.Forms.ProgressBar progressBar;\r
+        private System.Windows.Forms.Label label2;\r
+        private System.Windows.Forms.Label lbl_progressValue;\r
+        internal System.Windows.Forms.Button btn_cancel;\r
+        private System.Windows.Forms.Label lbl_status;\r
+        private System.Windows.Forms.ToolTip toolTip1;\r
+        public System.Windows.Forms.ListBox list_queue;\r
+        private System.Windows.Forms.TextBox text_edit;\r
+        internal System.Windows.Forms.Button btn_updateQuery;\r
+        private System.Windows.Forms.Label label4;\r
         private System.Windows.Forms.Label lbl_chapt;\r
         private System.Windows.Forms.Label lbl_title;\r
-        private System.Windows.Forms.Label label4;\r
-        private System.Windows.Forms.TextBox txt_editQuery;\r
-        internal System.Windows.Forms.Button btn_update;\r
+        private System.Windows.Forms.Label lbl_aEnc;\r
+        private System.Windows.Forms.Label lbl_vEnc;\r
+        private System.Windows.Forms.Label lbl_dest;\r
+        private System.Windows.Forms.Label lbl_source;\r
+        private System.Windows.Forms.Label label1;\r
+        private System.Windows.Forms.Label label3;\r
+        private System.Windows.Forms.PictureBox pictureBox1;\r
     }\r
 }
\ No newline at end of file
index 4ffa628..3444a16 100644 (file)
@@ -13,59 +13,46 @@ namespace Handbrake
 {\r
     public partial class frmQueue : Form\r
     {\r
-        // Declarations\r
         private delegate void ProgressUpdateHandler();\r
-        private delegate void getQueueItem();\r
         private delegate void setEncoding();\r
-        private delegate void modifyQueue();\r
 \r
-        // Everything starts Here\r
         public frmQueue()\r
         {\r
             InitializeComponent();\r
         }\r
 \r
-        #region encode queue Handlnig\r
-\r
-        // Declarations\r
+        #region Queue Handling\r
         Boolean cancel = false;\r
-        string foundQuery = "";\r
-        [DllImport("user32.dll")]\r
-        public static extern void LockWorkStation();\r
-        [DllImport("user32.dll")]\r
-        public static extern int ExitWindowsEx(int uFlags, int dwReason);\r
-\r
-        // Methods\r
         private void btn_q_encoder_Click(object sender, EventArgs e)\r
         {\r
             // Reset some values\r
-\r
+            \r
             lbl_status.Visible = false;\r
             cancel = false;\r
 \r
             // Start the encode\r
             try\r
             {\r
-                if (listview_queue.Items.Count != 0)\r
+                if (list_queue.Items.Count != 0)\r
                 {\r
                     // Setup or reset some values\r
                     btn_cancel.Visible = true;\r
                     progressBar.Value = 0;\r
                     lbl_progressValue.Text = "0 %";\r
-                    progressBar.Step = 100 / listview_queue.Items.Count;\r
+                    progressBar.Step = 100 / list_queue.Items.Count;\r
                     progressBar.Update();\r
                     //ThreadPool.QueueUserWorkItem(startProc);\r
                     // Testing a new way of launching a thread. Hopefully will fix a random freeze up of the main thread.\r
                     Thread theQ = new Thread(startProc);\r
                     theQ.Start();\r
-                }\r
+                 }\r
             }\r
             catch (Exception exc)\r
             {\r
                 MessageBox.Show(exc.ToString());\r
             }\r
+             \r
         }\r
-\r
         private void btn_cancel_Click(object sender, EventArgs e)\r
         {\r
             cancel = true;\r
@@ -73,18 +60,21 @@ 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);\r
         }\r
 \r
+        [DllImport("user32.dll")]\r
+        public static extern void LockWorkStation();\r
+        [DllImport("user32.dll")]\r
+        public static extern int ExitWindowsEx(int uFlags, int dwReason);\r
+\r
         private void startProc(object state)\r
         {\r
             try\r
             {\r
-                while (listview_queue.Items.Count != 0)\r
+                while (list_queue.Items.Count != 0)\r
                 {\r
-                    getItem();\r
-                    string query = foundQuery;\r
-                    query = query.Replace("ListViewItem: { ", "").Replace(" }", "").Trim();\r
-                    updateUIElements();\r
+                    string query = list_queue.Items[0].ToString();\r
                     setEncValue();\r
-\r
+                    updateUIElements();\r
+                   \r
                     Functions.CLI process = new Functions.CLI();\r
                     Process hbProc = process.runCli(this, query, false, false, false, false);\r
 \r
@@ -98,11 +88,11 @@ namespace Handbrake
                     {\r
                         break;\r
                     }\r
-\r
+                    \r
                 }\r
 \r
                 resetQueue();\r
-\r
+                \r
                 // Do something whent he encode ends.\r
                 switch (Properties.Settings.Default.CompletionOption)\r
                 {\r
@@ -134,72 +124,6 @@ namespace Handbrake
             }\r
         }\r
 \r
-        private void getItem()\r
-        {\r
-            try\r
-            {\r
-                if (this.InvokeRequired)\r
-                {\r
-                    this.BeginInvoke(new getQueueItem(getItem));\r
-                }\r
-                foundQuery = this.listview_queue.Items[0].ToString();\r
-            }\r
-            catch (Exception)\r
-            {\r
-                // Do Nothing\r
-            }\r
-        }\r
-\r
-        private void setEncValue()\r
-        {\r
-            try\r
-            {\r
-                if (this.InvokeRequired)\r
-                {\r
-                    this.BeginInvoke(new setEncoding(setEncValue));\r
-                }\r
-\r
-                string query = null;\r
-                ListView.SelectedListViewItemCollection name = null;\r
-                name = listview_queue.SelectedItems;\r
-\r
-                if (listview_queue.SelectedItems.Count != 0)\r
-                    query = name[0].SubItems[0].Text;\r
-\r
-                // found query is a global varible\r
-                Functions.QueryParser parsed = Functions.QueryParser.Parse(foundQuery);\r
-                lbl_source.Text = parsed.Source;\r
-                lbl_dest.Text = parsed.Destination;\r
-\r
-\r
-                if (parsed.DVDTitle == 0)\r
-                    lbl_title.Text = "Auto";\r
-                else\r
-                    lbl_title.Text = parsed.DVDTitle.ToString();\r
-\r
-                string chatpers = "";\r
-                if (parsed.DVDChapterStart == 0)\r
-                {\r
-                    lbl_chapt.Text = "Auto";\r
-                }\r
-                else\r
-                {\r
-                    chatpers = parsed.DVDChapterStart.ToString();\r
-                    if (parsed.DVDChapterFinish != 0)\r
-                        chatpers = chatpers + " - " + parsed.DVDChapterFinish;\r
-                    lbl_chapt.Text = parsed.DVDChapterStart + chatpers;\r
-                }\r
-\r
-                lbl_vEnc.Text = parsed.VideoEncoder;\r
-                lbl_aEnc.Text = parsed.AudioEncoder;\r
-            }\r
-            catch (Exception)\r
-            {\r
-                // Do Nothing\r
-            }\r
-\r
-        }\r
-\r
         private void updateUIElements()\r
         {\r
             try\r
@@ -209,7 +133,7 @@ namespace Handbrake
                     this.BeginInvoke(new ProgressUpdateHandler(updateUIElements));\r
                     return;\r
                 }\r
-                this.listview_queue.Items.RemoveAt(0);\r
+                this.list_queue.Items.RemoveAt(0);\r
 \r
                 progressBar.PerformStep();\r
                 lbl_progressValue.Text = string.Format("{0} %", progressBar.Value);\r
@@ -235,11 +159,13 @@ namespace Handbrake
                 {\r
                     lbl_status.Visible = true;\r
                     lbl_status.Text = "Encode Queue Cancelled!";\r
+                    text_edit.Text = "";\r
                 }\r
                 else\r
                 {\r
                     lbl_status.Visible = true;\r
                     lbl_status.Text = "Encode Queue Completed!";\r
+                    text_edit.Text = "";\r
                 }\r
                 btn_cancel.Visible = false;\r
 \r
@@ -259,144 +185,138 @@ namespace Handbrake
                 MessageBox.Show(exc.ToString());\r
             }\r
         }\r
+        \r
+        private void setEncValue()\r
+        {\r
+            try\r
+            {\r
+                if (this.InvokeRequired)\r
+                {\r
+                    this.BeginInvoke(new setEncoding(setEncValue));\r
+                }\r
+\r
+                string query = query = list_queue.Items[0].ToString();\r
+\r
+                // found query is a global varible\r
+                Functions.QueryParser parsed = Functions.QueryParser.Parse(query);\r
+                lbl_source.Text = parsed.Source;\r
+                lbl_dest.Text = parsed.Destination;\r
+\r
+\r
+                if (parsed.DVDTitle == 0)\r
+                    lbl_title.Text = "Auto";\r
+                else\r
+                    lbl_title.Text = parsed.DVDTitle.ToString();\r
+\r
+                string chatpers = "";\r
+                if (parsed.DVDChapterStart == 0)\r
+                {\r
+                    lbl_chapt.Text = "Auto";\r
+                }\r
+                else\r
+                {\r
+                    chatpers = parsed.DVDChapterStart.ToString();\r
+                    if (parsed.DVDChapterFinish != 0)\r
+                        chatpers = chatpers + " - " + parsed.DVDChapterFinish;\r
+                    lbl_chapt.Text = parsed.DVDChapterStart + chatpers;\r
+                }\r
+\r
+                lbl_vEnc.Text = parsed.VideoEncoder;\r
+                lbl_aEnc.Text = parsed.AudioEncoder;\r
+            }\r
+            catch (Exception)\r
+            {\r
+                // Do Nothing\r
+            }\r
+        }\r
 \r
         #endregion\r
 \r
         #region Queue Management\r
+\r
         private void btn_up_Click(object sender, EventArgs e)\r
         {\r
-            string cache;\r
-            int selIdx;\r
-            if (listview_queue.Items.Count != 0)\r
-            {\r
-                selIdx = listview_queue.SelectedItems[0].Index;\r
-                // ignore moveup of row(0)\r
-                if (selIdx == 0)\r
-                    return;\r
+            int count = list_queue.Items.Count;\r
+            int itemToMove = list_queue.SelectedIndex;\r
+            int previousItemint = 0;\r
+            String previousItem = "";\r
 \r
-                // move the subitems for the previous row\r
-                // to cache to make room for the selected row\r
-                for (int i = 0; i < listview_queue.Items[selIdx].SubItems.Count; i++)\r
-                {\r
-                    cache = listview_queue.Items[selIdx - 1].SubItems[i].Text;\r
-                    listview_queue.Items[selIdx - 1].SubItems[i].Text =\r
-                      listview_queue.Items[selIdx].SubItems[i].Text;\r
-                    listview_queue.Items[selIdx].SubItems[i].Text = cache;\r
-                }\r
-                listview_queue.Items[selIdx - 1].Selected = true;\r
-                listview_queue.Refresh();\r
-                listview_queue.Focus();\r
+            if (itemToMove > 0)\r
+            {\r
+                previousItemint = itemToMove - 1;\r
+                previousItem = list_queue.Items[previousItemint].ToString();\r
+                list_queue.Items[previousItemint] = list_queue.Items[itemToMove];\r
+                list_queue.Items[itemToMove] = previousItem;\r
+                list_queue.SelectedIndex = list_queue.SelectedIndex - 1;\r
             }\r
         }\r
 \r
         private void btn_down_Click(object sender, EventArgs e)\r
         {\r
-            string cache;\r
-            int selIdx;\r
-            \r
-            if (listview_queue.Items.Count != 0)\r
-            {\r
-                selIdx = listview_queue.SelectedItems[0].Index;\r
+            int count = list_queue.Items.Count;\r
+            int itemToMove = list_queue.SelectedIndex;\r
+            int itemAfterInt = 0;\r
+            String itemAfter = "";\r
 \r
-                // ignore movedown of last item\r
-                if (selIdx == listview_queue.Items.Count - 1)\r
-                    return;\r
-                // move the subitems for the next row\r
-                // to cache so we can move the selected row down\r
-                for (int i = 0; i < listview_queue.Items[selIdx].SubItems.Count; i++)\r
-                {\r
-                    cache = listview_queue.Items[selIdx + 1].SubItems[i].Text;\r
-                    listview_queue.Items[selIdx + 1].SubItems[i].Text =\r
-                      listview_queue.Items[selIdx].SubItems[i].Text;\r
-                    listview_queue.Items[selIdx].SubItems[i].Text = cache;\r
-                }\r
-                listview_queue.Items[selIdx + 1].Selected = true;\r
-                listview_queue.Refresh();\r
-            listview_queue.Focus();\r
+            if (itemToMove < (count - 1))\r
+            {\r
+                itemAfterInt = itemToMove + 1;\r
+                itemAfter = list_queue.Items[itemAfterInt].ToString();\r
+                list_queue.Items[itemAfterInt] = list_queue.Items[itemToMove];\r
+                list_queue.Items[itemToMove] = itemAfter;\r
+                list_queue.SelectedIndex = list_queue.SelectedIndex + 1;\r
             }\r
         }\r
 \r
         private void btn_delete_Click(object sender, EventArgs e)\r
         {\r
-            for (int i = listview_queue.SelectedItems.Count - 1; i >= 0; i--)\r
-            {\r
-                ListViewItem item = listview_queue.SelectedItems[i];\r
-                listview_queue.Items.Remove(item);\r
-            }\r
+            list_queue.Items.Remove(list_queue.SelectedItem);\r
         }\r
+\r
         #endregion\r
 \r
-        #region Modify Queue\r
+        #region Queue Item Modification\r
 \r
         int listCount = 0;\r
-        private void listview_queue_SelectedIndexChanged(object sender, EventArgs e)\r
-        {\r
-            modQ();\r
-            listCount = listview_queue.Items.Count;\r
-        }\r
 \r
-        private void modQ()\r
+        private void btn_updateQuery_Click(object sender, EventArgs e)\r
         {\r
-            try\r
+            if (text_edit.Text != "")\r
             {\r
-                if (this.InvokeRequired)\r
+                if (list_queue.Items.Count != listCount)\r
                 {\r
-                    this.BeginInvoke(new modifyQueue(modQ));\r
+                    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);\r
                 }\r
-\r
-                string query = null;\r
-                ListView.SelectedListViewItemCollection name = null;\r
-                name = listview_queue.SelectedItems;\r
-\r
-                if (listview_queue.SelectedItems.Count != 0)\r
-                    query = name[0].SubItems[0].Text;\r
-\r
-                txt_editQuery.Text = query;\r
-\r
-            }\r
-            catch (Exception)\r
-            {\r
-            }\r
-        }\r
-\r
-        private void btn_update_Click(object sender, EventArgs e)\r
-        {\r
-            try\r
-            {\r
-                if (txt_editQuery.Text != "")\r
+                else\r
                 {\r
-                    if (listview_queue.Items.Count != listCount)\r
+                    if (list_queue.SelectedItem != null)\r
                     {\r
-                        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);\r
-                    }\r
-                    else\r
-                    {\r
-                        if (listview_queue.SelectedItems != null)\r
-                        {\r
-                            int selectItm = listview_queue.SelectedIndices[0];\r
-                            listview_queue.Items[selectItm].Text = txt_editQuery.Text;\r
-                        }\r
                     }\r
+          \r
                 }\r
             }\r
-            catch (Exception exc)\r
-            {\r
-                MessageBox.Show(exc.ToString());\r
-            }\r
+        }\r
+\r
+        private void list_queue_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if (list_queue.SelectedItem != null)\r
+                text_edit.Text = list_queue.SelectedItem.ToString();\r
+\r
+            listCount = list_queue.Items.Count;\r
         }\r
 \r
         #endregion\r
 \r
-        protected override void OnClosing(CancelEventArgs e)\r
+        private void btn_Close_Click(object sender, EventArgs e)\r
         {\r
-            e.Cancel = true;\r
             this.Hide();\r
-            base.OnClosing(e);\r
         }\r
 \r
-        private void btn_Close_Click(object sender, EventArgs e)\r
+        protected override void OnClosing(CancelEventArgs e)\r
         {\r
+            e.Cancel = true;\r
             this.Hide();\r
+            base.OnClosing(e);\r
         }\r
 \r
     }\r
index 37f9290..2ddcb69 100644 (file)
   <resheader name="writer">\r
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
   </resheader>\r
+  <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>17, 17</value>\r
+  </metadata>\r
   <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
     <value>\r