OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 15 Mar 2009 14:12:48 +0000 (14:12 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 15 Mar 2009 14:12:48 +0000 (14:12 +0000)
- Enable tabstops on the add preset window.
- Confirm closing of program if Queue is running (ExDeus)
- Minor fixes/cleanup from Exdeus (Destination Browse Button, Tools > Show Queue,  MessageBox in frmQueue)
- Code cleanup in a few other files.

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

13 files changed:
win/C#/Functions/Main.cs
win/C#/Functions/QueryParser.cs
win/C#/Functions/QueryParserTester.cs
win/C#/HandBrakeCS.csproj
win/C#/Properties/Resources.Designer.cs
win/C#/Properties/Resources.resx
win/C#/Queue/QueueHandler.cs
win/C#/Resources/AddToQueue_small.png [new file with mode: 0644]
win/C#/frmAddPreset.Designer.cs
win/C#/frmMain.cs
win/C#/frmMain/QueryGenerator.cs
win/C#/frmQueue.Designer.cs
win/C#/frmQueue.cs

index 13579c9..59af6bf 100644 (file)
@@ -30,7 +30,7 @@ namespace Handbrake.Functions
             // Get the durations between the 2 chapter points and add them together.\r
             if (chapter_start != "Auto" && chapter_end != "Auto")\r
             {\r
-                int start_chapter, end_chapter = 0;\r
+                int start_chapter, end_chapter;\r
                 int.TryParse(chapter_start, out start_chapter);\r
                 int.TryParse(chapter_end, out end_chapter);\r
 \r
@@ -56,6 +56,11 @@ namespace Handbrake.Functions
         /// Calculate the non-anamorphic resoltuion of the source\r
         /// </summary>\r
         /// <param name="width"></param>\r
+        /// <param name="top"></param>\r
+        /// <param name="bottom"></param>\r
+        /// <param name="left"></param>\r
+        /// <param name="right"></param>\r
+        /// <param name="selectedTitle"></param>\r
         /// <returns></returns>\r
         public int cacluateNonAnamorphicHeight(int width, decimal top, decimal bottom, decimal left, decimal right, Parsing.Title selectedTitle)\r
         {\r
@@ -109,18 +114,18 @@ namespace Handbrake.Functions
         public Parsing.Title selectLongestTitle(ComboBox drp_dvdtitle)\r
         {\r
             int current_largest = 0;\r
-            Handbrake.Parsing.Title title2Select;\r
+            Parsing.Title title2Select;\r
 \r
             // Check if there are titles in the DVD title dropdown menu and make sure, it's not just "Automatic"\r
             if (drp_dvdtitle.Items[0].ToString() != "Automatic")\r
-                title2Select = (Handbrake.Parsing.Title)drp_dvdtitle.Items[0];\r
+                title2Select = (Parsing.Title)drp_dvdtitle.Items[0];\r
             else\r
                 title2Select = null;\r
 \r
             // So, If there are titles in the DVD Title dropdown menu, lets select the longest.\r
             if (title2Select != null)\r
             {\r
-                foreach (Handbrake.Parsing.Title x in drp_dvdtitle.Items)\r
+                foreach (Parsing.Title x in drp_dvdtitle.Items)\r
                 {\r
                     string title = x.ToString();\r
                     if (title != "Automatic")\r
@@ -156,7 +161,6 @@ namespace Handbrake.Functions
         /// <summary>\r
         /// Set's up the DataGridView on the Chapters tab (frmMain)\r
         /// </summary>\r
-        /// <param name="mainWindow"></param>\r
         public DataGridView chapterNaming(DataGridView data_chpt, string chapter_end)\r
         {\r
             int i = 0, finish = 0;\r
@@ -181,7 +185,6 @@ namespace Handbrake.Functions
         /// Function which generates the filename and path automatically based on \r
         /// the Source Name, DVD title and DVD Chapters\r
         /// </summary>\r
-        /// <param name="mainWindow"></param>\r
         public string autoName(ComboBox drp_dvdtitle, string chapter_start, string chatper_end, string source, string dest, int format)\r
         {\r
             string AutoNamePath = string.Empty;\r
@@ -202,7 +205,7 @@ namespace Handbrake.Functions
                     combinedChapterTag = chapterStart + "-" + chapterFinish;\r
 \r
                 // Get the destination filename.\r
-                string destination_filename = "";\r
+                string destination_filename;\r
                 if (Properties.Settings.Default.autoNameFormat != "")\r
                 {\r
                     destination_filename = Properties.Settings.Default.autoNameFormat;\r
@@ -228,15 +231,10 @@ namespace Handbrake.Functions
                 if (!dest.Contains(Path.DirectorySeparatorChar.ToString()))\r
                 {\r
                     // If there is an auto name path, use it...\r
-                    if (Properties.Settings.Default.autoNamePath.Trim() != "" && \r
-                        Properties.Settings.Default.autoNamePath.Trim() != "Click 'Browse' to set the default location") \r
-                    {\r
+                    if (Properties.Settings.Default.autoNamePath.Trim() != "" && Properties.Settings.Default.autoNamePath.Trim() != "Click 'Browse' to set the default location") \r
                         AutoNamePath = Path.Combine(Properties.Settings.Default.autoNamePath, destination_filename);\r
-                    }\r
                     else // ...otherwise, output to the source directory\r
-                    {\r
                         AutoNamePath = null;\r
-                    }\r
                 }\r
                 else // Otherwise, use the path that is already there.\r
                 {\r
@@ -258,7 +256,7 @@ namespace Handbrake.Functions
         {\r
             try\r
             {\r
-                Functions.AppcastReader rssRead = new Functions.AppcastReader();\r
+                Functions.AppcastReader rssRead = new AppcastReader();\r
                 rssRead.getInfo(); // Initializes the class.\r
                 string build = rssRead.build();\r
 \r
@@ -268,16 +266,14 @@ namespace Handbrake.Functions
 \r
                 if (latest == skip)\r
                     return false;\r
-                else\r
-                {\r
-                    Boolean update = (latest > current);\r
-                    return update;\r
-                }\r
+                \r
+                Boolean update = (latest > current);\r
+                return update;\r
             }\r
             catch (Exception exc)\r
             {\r
-                if (debug == true)\r
-                    MessageBox.Show("Unable to check for updates, Please try again later. \n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                if (debug)\r
+                    MessageBox.Show("Unable to check for updates, Please try again later. \n" + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
                 return false;\r
             }\r
         }\r
index b297ed6..b3c8a70 100644 (file)
@@ -8,7 +8,6 @@ using System;
 using System.Globalization;\r
 using System.Text.RegularExpressions;\r
 using System.Windows.Forms;\r
-using System.Collections;\r
 \r
 namespace Handbrake.Functions\r
 {\r
index 75d8c30..1606a77 100644 (file)
@@ -1,9 +1,4 @@
 using System;\r
-using System.Collections.Generic;\r
-using System.ComponentModel;\r
-using System.Data;\r
-using System.Drawing;\r
-using System.Text;\r
 using System.Windows.Forms;\r
 \r
 namespace Handbrake.Functions\r
index 7ddbeb8..7542e60 100644 (file)
     <None Include="Resources\ActivityWindow.png" />\r
     <None Include="Resources\AddToQueue.png" />\r
     <Content Include="Resources\ActivityWindow_small.png" />\r
+    <None Include="Resources\AddToQueue_small.png" />\r
     <Content Include="Resources\copy.png" />\r
     <Content Include="Resources\disc_small.png" />\r
     <None Include="Resources\hb32.png" />\r
index d347dc4..70b73b7 100644 (file)
@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------\r
 // <auto-generated>\r
 //     This code was generated by a tool.\r
-//     Runtime Version:2.0.50727.3053\r
+//     Runtime Version:2.0.50727.1433\r
 //\r
 //     Changes to this file may cause incorrect behavior and will be lost if\r
 //     the code is regenerated.\r
@@ -81,6 +81,13 @@ namespace Handbrake.Properties {
             }\r
         }\r
         \r
+        internal static System.Drawing.Bitmap AddToQueue_small {\r
+            get {\r
+                object obj = ResourceManager.GetObject("AddToQueue_small", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
         internal static System.Drawing.Bitmap copy {\r
             get {\r
                 object obj = ResourceManager.GetObject("copy", resourceCulture);\r
index db3ecbe..7807b0e 100644 (file)
   <data name="picture" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
     <value>..\Resources\picture.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
   </data>\r
+  <data name="AddToQueue_small" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\AddToQueue_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
 </root>
\ No newline at end of file
index 3486e23..478757e 100644 (file)
@@ -18,7 +18,7 @@ namespace Handbrake.Queue
     {\r
         private static XmlSerializer ser = new XmlSerializer(typeof(List<QueueItem>));\r
         List<QueueItem> queue = new List<QueueItem>();\r
-        int id = 0; // Unique identifer number for each job\r
+        int id; // Unique identifer number for each job\r
         private QueueItem lastItem;\r
 \r
         #region Queue Handling\r
@@ -53,6 +53,8 @@ namespace Handbrake.Queue
         /// Add's a new item to the queue\r
         /// </summary>\r
         /// <param name="query">String</param>\r
+        /// <param name="source"></param>\r
+        /// <param name="destination"></param>\r
         public void add(string query, string source, string destination)\r
         {\r
             QueueItem newJob = new QueueItem();\r
@@ -94,7 +96,7 @@ namespace Handbrake.Queue
         {\r
             if (index > 0)\r
             {\r
-                QueueItem item = (QueueItem)queue[index];\r
+                QueueItem item = queue[index];\r
 \r
                 queue.RemoveAt(index);\r
                 queue.Insert((index - 1), item);\r
@@ -109,7 +111,7 @@ namespace Handbrake.Queue
         {\r
             if (index < queue.Count - 1)\r
             {\r
-                QueueItem item = (QueueItem)queue[index];\r
+                QueueItem item = queue[index];\r
 \r
                 queue.RemoveAt(index);\r
                 queue.Insert((index + 1), item);\r
@@ -122,7 +124,7 @@ namespace Handbrake.Queue
         /// </summary>\r
         public void write2disk(string file)\r
         {\r
-            string tempPath = "";\r
+            string tempPath;\r
             if (file == "hb_queue_recovery.xml")\r
                 tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.xml");\r
             else\r
@@ -154,7 +156,7 @@ namespace Handbrake.Queue
             foreach (QueueItem queue_item in queue)\r
             {\r
                 string q_item = queue_item.Query;\r
-                string fullQuery = '"' + Application.StartupPath.ToString() + "\\HandBrakeCLI.exe" + '"' + q_item;\r
+                string fullQuery = '"' + Application.StartupPath + "\\HandBrakeCLI.exe" + '"' + q_item;\r
 \r
                 if (queries == string.Empty)\r
                     queries = queries + fullQuery;\r
@@ -188,7 +190,7 @@ namespace Handbrake.Queue
         /// </summary>\r
         public void recoverQueue(string file)\r
         {\r
-            string tempPath = "";\r
+            string tempPath;\r
             if (file == "hb_queue_recovery.xml")\r
                 tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.xml");\r
             else\r
@@ -216,8 +218,8 @@ namespace Handbrake.Queue
         //------------------------------------------------------------------------\r
         Functions.Encode encodeHandler = new Functions.Encode();\r
         private Boolean started = false;\r
-        private Boolean paused = false;\r
-        private Boolean encoding = false;\r
+        private Boolean paused;\r
+        private Boolean encoding;\r
 \r
         #region Encoding\r
 \r
@@ -239,15 +241,14 @@ namespace Handbrake.Queue
             Thread theQueue;\r
             if (this.count() != 0)\r
             {\r
-                if (paused == true)\r
+                if (paused)\r
                     paused = false;\r
                 else\r
                 {\r
                     paused = false;\r
                     try\r
                     {\r
-                        theQueue = new Thread(startProc);\r
-                        theQueue.IsBackground = true;\r
+                        theQueue = new Thread(startProc) {IsBackground = true};\r
                         theQueue.Start();\r
                     }\r
                     catch (Exception exc)\r
@@ -265,7 +266,7 @@ namespace Handbrake.Queue
 \r
         private void startProc(object state)\r
         {\r
-            Process hbProc = new Process();\r
+            Process hbProc;\r
             try\r
             {\r
                 // Run through each item on the queue\r
@@ -283,11 +284,9 @@ namespace Handbrake.Queue
 \r
                     hbProc.Close();\r
                     hbProc.Dispose();\r
-                    hbProc = null;\r
-                    query = "";\r
                     EncodeFinished(null);\r
 \r
-                    while (paused == true) // Need to find a better way of doing this.\r
+                    while (paused) // Need to find a better way of doing this.\r
                     {\r
                         Thread.Sleep(10000);\r
                     }\r
diff --git a/win/C#/Resources/AddToQueue_small.png b/win/C#/Resources/AddToQueue_small.png
new file mode 100644 (file)
index 0000000..5bb0818
Binary files /dev/null and b/win/C#/Resources/AddToQueue_small.png differ
index c7bea2b..be37ade 100644 (file)
@@ -60,7 +60,7 @@ namespace Handbrake
             this.txt_preset_name.Location = new System.Drawing.Point(109, 17);\r
             this.txt_preset_name.Name = "txt_preset_name";\r
             this.txt_preset_name.Size = new System.Drawing.Size(241, 21);\r
-            this.txt_preset_name.TabIndex = 2;\r
+            this.txt_preset_name.TabIndex = 0;\r
             // \r
             // btn_add\r
             // \r
@@ -68,11 +68,10 @@ namespace Handbrake
             this.btn_add.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
             this.btn_add.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.btn_add.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_add.Location = new System.Drawing.Point(284, 67);\r
+            this.btn_add.Location = new System.Drawing.Point(212, 72);\r
             this.btn_add.Name = "btn_add";\r
             this.btn_add.Size = new System.Drawing.Size(66, 22);\r
-            this.btn_add.TabIndex = 0;\r
-            this.btn_add.TabStop = false;\r
+            this.btn_add.TabIndex = 2;\r
             this.btn_add.Text = "Add";\r
             this.btn_add.UseVisualStyleBackColor = false;\r
             this.btn_add.Click += new System.EventHandler(this.btn_add_Click);\r
@@ -83,11 +82,10 @@ namespace Handbrake
             this.btn_cancel.FlatAppearance.BorderColor = System.Drawing.Color.Black;\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(212, 67);\r
+            this.btn_cancel.Location = new System.Drawing.Point(284, 72);\r
             this.btn_cancel.Name = "btn_cancel";\r
             this.btn_cancel.Size = new System.Drawing.Size(66, 22);\r
             this.btn_cancel.TabIndex = 3;\r
-            this.btn_cancel.TabStop = false;\r
             this.btn_cancel.Text = "Cancel";\r
             this.btn_cancel.UseVisualStyleBackColor = false;\r
             this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);\r
@@ -98,7 +96,7 @@ namespace Handbrake
             this.check_pictureSettings.Location = new System.Drawing.Point(109, 44);\r
             this.check_pictureSettings.Name = "check_pictureSettings";\r
             this.check_pictureSettings.Size = new System.Drawing.Size(118, 17);\r
-            this.check_pictureSettings.TabIndex = 4;\r
+            this.check_pictureSettings.TabIndex = 1;\r
             this.check_pictureSettings.Text = "Use Picture Size";\r
             this.toolTip.SetToolTip(this.check_pictureSettings, "Save Picture Width/Height and Crop Values");\r
             this.check_pictureSettings.UseVisualStyleBackColor = true;\r
index 4ec8b28..a915148 100644 (file)
@@ -222,7 +222,6 @@ namespace Handbrake
         #region Tools Menu\r
         private void mnu_encode_Click(object sender, EventArgs e)\r
         {\r
-            queueWindow.setQueue();\r
             queueWindow.Show();\r
         }\r
         private void mnu_encodeLog_Click(object sender, EventArgs e)\r
@@ -937,7 +936,8 @@ namespace Handbrake
         {\r
             // This removes the file extension from the filename box on the save file dialog.\r
             // It's daft but some users don't realise that typing an extension overrides the dropdown extension selected.\r
-            DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", "").Replace(".m4v", "").Replace(".mkv", "").Replace(".ogm", "").Replace(".avi", "");\r
+            DVD_Save.FileName = Path.Combine(Path.GetDirectoryName(text_destination.Text), Path.GetFileNameWithoutExtension(text_destination.Text));\r
+\r
 \r
             // Show the dialog and set the main form file path\r
             if (drop_format.SelectedIndex.Equals(0))\r
@@ -2103,7 +2103,24 @@ namespace Handbrake
 \r
         #endregion\r
 \r
-\r
+        #region overrides\r
+        /// <summary>\r
+        /// If the queue is being processed, prompt the user to confirm application close.\r
+        /// </summary>\r
+        /// <param name="e"></param>\r
+        protected override void OnFormClosing(FormClosingEventArgs e)\r
+        {\r
+            // If currently encoding, the queue isn't paused, and there are queue items to process, prompt to confirm close.\r
+            if ((encodeQueue.isEncoding) && (! encodeQueue.isPaused) && (encodeQueue.count() > 0))\r
+            {\r
+                DialogResult result = MessageBox.Show("HandBrake has queue items to process. Closing HandBrake will not stop the current encoding, but will stop processing the queue.\n\nDo you want to close HandBrake?",\r
+                    "Close HandBrake?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
+                if (result == DialogResult.No)\r
+                    e.Cancel = true;\r
+            }\r
+            base.OnFormClosing(e);\r
+        }\r
+        #endregion\r
         // This is the END of the road ------------------------------------------------------------------------------\r
     }\r
 }\r
index 2c04173..05e73b8 100644 (file)
@@ -219,9 +219,9 @@ namespace Handbrake
                         break;\r
                     case "H.264 (x264)":\r
                         double divided;\r
-                        System.Globalization.CultureInfo culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");\r
+                        System.Globalization.CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");\r
                         double.TryParse(Properties.Settings.Default.x264cqstep,\r
-                                        System.Globalization.NumberStyles.Number,\r
+                                        NumberStyles.Number,\r
                                         culture,\r
                                         out divided);\r
                         value = 51 - mainWindow.slider_videoQuality.Value * divided;\r
@@ -384,8 +384,7 @@ namespace Handbrake
                 query += " -U ";\r
             else if (subtitles != "" && subtitles != "None")\r
             {\r
-                string[] tempSub;\r
-                tempSub = subtitles.Split(' ');\r
+                string[] tempSub = subtitles.Split(' ');\r
                 query += " -s " + tempSub[0];\r
             }\r
 \r
index 0f09bf6..259450d 100644 (file)
@@ -50,15 +50,7 @@ namespace Handbrake
             this.label1 = new System.Windows.Forms.Label();\r
             this.label3 = new System.Windows.Forms.Label();\r
             this.toolStrip1 = new System.Windows.Forms.ToolStrip();\r
-            this.btn_encode = new System.Windows.Forms.ToolStripButton();\r
-            this.btn_pause = new System.Windows.Forms.ToolStripButton();\r
             this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();\r
-            this.drop_button_queue = new System.Windows.Forms.ToolStripDropDownButton();\r
-            this.mnu_batch = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.mnu_import = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.mnu_export = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();\r
-            this.mnu_readd = new System.Windows.Forms.ToolStripMenuItem();\r
             this.SaveFile = new System.Windows.Forms.SaveFileDialog();\r
             this.list_queue = new System.Windows.Forms.ListView();\r
             this.Title = new System.Windows.Forms.ColumnHeader();\r
@@ -74,6 +66,14 @@ namespace Handbrake
             this.panel3 = new System.Windows.Forms.Panel();\r
             this.panel2 = new System.Windows.Forms.Panel();\r
             this.panel1 = new System.Windows.Forms.Panel();\r
+            this.btn_encode = new System.Windows.Forms.ToolStripButton();\r
+            this.btn_pause = new System.Windows.Forms.ToolStripButton();\r
+            this.drop_button_queue = new System.Windows.Forms.ToolStripDropDownButton();\r
+            this.mnu_batch = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_import = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_export = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.mnu_readd = new System.Windows.Forms.ToolStripMenuItem();\r
             this.toolStrip1.SuspendLayout();\r
             this.statusStrip1.SuspendLayout();\r
             this.splitContainer1.Panel1.SuspendLayout();\r
@@ -230,84 +230,11 @@ namespace Handbrake
             this.toolStrip1.TabIndex = 71;\r
             this.toolStrip1.Text = "toolStrip1";\r
             // \r
-            // btn_encode\r
-            // \r
-            this.btn_encode.Image = global::Handbrake.Properties.Resources.Play;\r
-            this.btn_encode.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
-            this.btn_encode.ImageTransparentColor = System.Drawing.Color.Magenta;\r
-            this.btn_encode.Name = "btn_encode";\r
-            this.btn_encode.Size = new System.Drawing.Size(84, 36);\r
-            this.btn_encode.Text = "Encode";\r
-            this.btn_encode.Click += new System.EventHandler(this.btn_encode_Click);\r
-            // \r
-            // btn_pause\r
-            // \r
-            this.btn_pause.Image = global::Handbrake.Properties.Resources.Pause;\r
-            this.btn_pause.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
-            this.btn_pause.ImageTransparentColor = System.Drawing.Color.Magenta;\r
-            this.btn_pause.Name = "btn_pause";\r
-            this.btn_pause.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;\r
-            this.btn_pause.Size = new System.Drawing.Size(75, 36);\r
-            this.btn_pause.Text = "Pause";\r
-            this.btn_pause.Visible = false;\r
-            this.btn_pause.Click += new System.EventHandler(this.btn_pause_Click);\r
-            // \r
             // toolStripSeparator1\r
             // \r
             this.toolStripSeparator1.Name = "toolStripSeparator1";\r
             this.toolStripSeparator1.Size = new System.Drawing.Size(6, 39);\r
             // \r
-            // drop_button_queue\r
-            // \r
-            this.drop_button_queue.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
-            this.mnu_batch,\r
-            this.mnu_import,\r
-            this.mnu_export,\r
-            this.toolStripSeparator2,\r
-            this.mnu_readd});\r
-            this.drop_button_queue.Image = global::Handbrake.Properties.Resources.ActivityWindow;\r
-            this.drop_button_queue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
-            this.drop_button_queue.ImageTransparentColor = System.Drawing.Color.Magenta;\r
-            this.drop_button_queue.Name = "drop_button_queue";\r
-            this.drop_button_queue.Size = new System.Drawing.Size(89, 36);\r
-            this.drop_button_queue.Text = "Queue";\r
-            // \r
-            // mnu_batch\r
-            // \r
-            this.mnu_batch.Image = global::Handbrake.Properties.Resources.Output_Small;\r
-            this.mnu_batch.Name = "mnu_batch";\r
-            this.mnu_batch.Size = new System.Drawing.Size(207, 22);\r
-            this.mnu_batch.Text = "Generate Batch Script";\r
-            this.mnu_batch.Click += new System.EventHandler(this.mnu_batch_Click);\r
-            // \r
-            // mnu_import\r
-            // \r
-            this.mnu_import.Image = global::Handbrake.Properties.Resources.folder;\r
-            this.mnu_import.Name = "mnu_import";\r
-            this.mnu_import.Size = new System.Drawing.Size(207, 22);\r
-            this.mnu_import.Text = "Import Queue";\r
-            this.mnu_import.Click += new System.EventHandler(this.mnu_import_Click);\r
-            // \r
-            // mnu_export\r
-            // \r
-            this.mnu_export.Image = global::Handbrake.Properties.Resources.save;\r
-            this.mnu_export.Name = "mnu_export";\r
-            this.mnu_export.Size = new System.Drawing.Size(207, 22);\r
-            this.mnu_export.Text = "Export Queue";\r
-            this.mnu_export.Click += new System.EventHandler(this.mnu_export_Click);\r
-            // \r
-            // toolStripSeparator2\r
-            // \r
-            this.toolStripSeparator2.Name = "toolStripSeparator2";\r
-            this.toolStripSeparator2.Size = new System.Drawing.Size(204, 6);\r
-            // \r
-            // mnu_readd\r
-            // \r
-            this.mnu_readd.Name = "mnu_readd";\r
-            this.mnu_readd.Size = new System.Drawing.Size(207, 22);\r
-            this.mnu_readd.Text = "Re-Add Current Job";\r
-            this.mnu_readd.Click += new System.EventHandler(this.mnu_readd_Click);\r
-            // \r
             // SaveFile\r
             // \r
             this.SaveFile.Filter = "Batch|.bat";\r
@@ -445,6 +372,81 @@ namespace Handbrake
             this.panel1.Size = new System.Drawing.Size(15, 234);\r
             this.panel1.TabIndex = 75;\r
             // \r
+            // btn_encode\r
+            // \r
+            this.btn_encode.Image = global::Handbrake.Properties.Resources.Play;\r
+            this.btn_encode.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.btn_encode.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_encode.Name = "btn_encode";\r
+            this.btn_encode.Size = new System.Drawing.Size(84, 36);\r
+            this.btn_encode.Text = "Encode";\r
+            this.btn_encode.Click += new System.EventHandler(this.btn_encode_Click);\r
+            // \r
+            // btn_pause\r
+            // \r
+            this.btn_pause.Image = global::Handbrake.Properties.Resources.Pause;\r
+            this.btn_pause.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.btn_pause.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_pause.Name = "btn_pause";\r
+            this.btn_pause.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;\r
+            this.btn_pause.Size = new System.Drawing.Size(75, 36);\r
+            this.btn_pause.Text = "Pause";\r
+            this.btn_pause.Visible = false;\r
+            this.btn_pause.Click += new System.EventHandler(this.btn_pause_Click);\r
+            // \r
+            // drop_button_queue\r
+            // \r
+            this.drop_button_queue.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.mnu_batch,\r
+            this.mnu_import,\r
+            this.mnu_export,\r
+            this.toolStripSeparator2,\r
+            this.mnu_readd});\r
+            this.drop_button_queue.Image = global::Handbrake.Properties.Resources.ActivityWindow;\r
+            this.drop_button_queue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.drop_button_queue.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.drop_button_queue.Name = "drop_button_queue";\r
+            this.drop_button_queue.Size = new System.Drawing.Size(89, 36);\r
+            this.drop_button_queue.Text = "Queue";\r
+            // \r
+            // mnu_batch\r
+            // \r
+            this.mnu_batch.Image = global::Handbrake.Properties.Resources.Output_Small;\r
+            this.mnu_batch.Name = "mnu_batch";\r
+            this.mnu_batch.Size = new System.Drawing.Size(207, 22);\r
+            this.mnu_batch.Text = "Generate Batch Script";\r
+            this.mnu_batch.Click += new System.EventHandler(this.mnu_batch_Click);\r
+            // \r
+            // mnu_import\r
+            // \r
+            this.mnu_import.Image = global::Handbrake.Properties.Resources.folder;\r
+            this.mnu_import.Name = "mnu_import";\r
+            this.mnu_import.Size = new System.Drawing.Size(207, 22);\r
+            this.mnu_import.Text = "Import Queue";\r
+            this.mnu_import.Click += new System.EventHandler(this.mnu_import_Click);\r
+            // \r
+            // mnu_export\r
+            // \r
+            this.mnu_export.Image = global::Handbrake.Properties.Resources.save;\r
+            this.mnu_export.Name = "mnu_export";\r
+            this.mnu_export.Size = new System.Drawing.Size(207, 22);\r
+            this.mnu_export.Text = "Export Queue";\r
+            this.mnu_export.Click += new System.EventHandler(this.mnu_export_Click);\r
+            // \r
+            // toolStripSeparator2\r
+            // \r
+            this.toolStripSeparator2.Name = "toolStripSeparator2";\r
+            this.toolStripSeparator2.Size = new System.Drawing.Size(204, 6);\r
+            // \r
+            // mnu_readd\r
+            // \r
+            this.mnu_readd.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;\r
+            this.mnu_readd.Image = global::Handbrake.Properties.Resources.AddToQueue_small;\r
+            this.mnu_readd.Name = "mnu_readd";\r
+            this.mnu_readd.Size = new System.Drawing.Size(207, 22);\r
+            this.mnu_readd.Text = "Re-Add Current Job";\r
+            this.mnu_readd.Click += new System.EventHandler(this.mnu_readd_Click);\r
+            // \r
             // frmQueue\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
index 26fd973..7699216 100644 (file)
@@ -87,7 +87,7 @@ namespace Handbrake
             queue.pauseEncode();\r
             setUIEncodeFinished();\r
             resetQueue();\r
-            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
+            MessageBox.Show("No further items on the queue will start. The current encode process will continue until it is finished. \nClick 'Encode' when you wish to continue encoding the queue.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
         }\r
 \r
         // Window Display Management\r