OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Mon, 7 Jul 2008 22:05:18 +0000 (22:05 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Mon, 7 Jul 2008 22:05:18 +0000 (22:05 +0000)
- Version information now pulled from the CLI (any problems with this breaking on Vista let me know plz!)
- GUI startup optimized to counter the effect of the slightly sluggish version check from CLI (above)
- Added "Format" box just like the macgui. Move the Video Codec dropdown to the correct position on the video tab.
- Few other changes to mimic the macgui.
- Changed Functions.CLI to Functions.Encode
- Cleaned up and added icons to the source menu.

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

17 files changed:
win/C#/Functions/Common.cs
win/C#/Functions/Encode.cs [moved from win/C#/Functions/CLI.cs with 77% similarity]
win/C#/Functions/QueryParser.cs
win/C#/HandBrakeCS.csproj
win/C#/Parsing/Title.cs
win/C#/Properties/Resources.Designer.cs
win/C#/Properties/Resources.resx
win/C#/Properties/Settings.Designer.cs
win/C#/Properties/Settings.settings
win/C#/Resources/ActivityWindow_small.png [new file with mode: 0644]
win/C#/Resources/disc_small.png [new file with mode: 0644]
win/C#/app.config
win/C#/frmMain.Designer.cs
win/C#/frmMain.cs
win/C#/frmMain.resx
win/C#/frmQueue.cs
win/C#/frmReadDVD.cs

index fc2b3c2..87256dc 100644 (file)
@@ -5,18 +5,19 @@
           It may be used under the terms of the GNU General Public License. */\r
 \r
 using System;\r
-using System.Collections.Generic;\r
+using System.Collections;\r
 using System.Text;\r
 using System.Windows.Forms;\r
 using System.Globalization;\r
 using System.IO;\r
 using System.Drawing;\r
+using System.Diagnostics;\r
+using System.Text.RegularExpressions;\r
 \r
 namespace Handbrake.Functions\r
 {\r
     class Common\r
     {\r
-\r
         /// <summary>\r
         /// Checks for updates and returns true if an update is available.\r
         /// </summary>\r
@@ -50,6 +51,64 @@ namespace Handbrake.Functions
         }\r
 \r
         /// <summary>\r
+        /// Get's HandBrakes version data from the CLI.\r
+        /// </summary>\r
+        /// <returns>Arraylist of Version Data. 0 = hb_version 1 = hb_build</returns>\r
+        public ArrayList getCliVersionData()\r
+        {\r
+            ArrayList cliVersionData = new ArrayList();\r
+            // 0 = SVN Build / Version\r
+            // 1 = Build Date\r
+\r
+            Process cliProcess = new Process();\r
+            ProcessStartInfo handBrakeCLI = new ProcessStartInfo("HandBrakeCLI.exe", " -u");\r
+            handBrakeCLI.UseShellExecute = false;\r
+            handBrakeCLI.RedirectStandardError = true;\r
+            handBrakeCLI.RedirectStandardOutput = true;\r
+            handBrakeCLI.CreateNoWindow = true;\r
+            cliProcess.StartInfo = handBrakeCLI;\r
+            cliProcess.Start();\r
+\r
+            // Retrieve standard output and report back to parent thread until the process is complete\r
+            String line;\r
+            TextReader stdOutput = cliProcess.StandardError;\r
+\r
+            while (!cliProcess.HasExited)\r
+            {\r
+                line = stdOutput.ReadLine();\r
+                Match m = Regex.Match(line, @"HandBrake svn[0-9]*[M]* \([0-9]*\)");\r
+                if (m.Success != false)\r
+                {\r
+                    string data = line.Replace("(", "").Replace(")","").Replace("HandBrake ","");\r
+                    string[] arr = data.Split(' ');\r
+                    cliVersionData.Add(arr[0]);\r
+                    cliVersionData.Add(arr[1]);\r
+                    return cliVersionData;\r
+                }\r
+            }\r
+            return null;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Update the presets.dat file with the latest version of HandBrak's presets from the CLI\r
+        /// </summary>\r
+        public void grabCLIPresets()\r
+        {\r
+            string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");\r
+            string presetsPath = Path.Combine(Application.StartupPath, "presets.dat");\r
+\r
+            string strCmdLine = String.Format(@"cmd /c """"{0}"" --preset-list >""{1}"" 2>&1""", handbrakeCLIPath, presetsPath);\r
+\r
+            ProcessStartInfo hbGetPresets = new ProcessStartInfo("CMD.exe", strCmdLine);\r
+            hbGetPresets.WindowStyle = ProcessWindowStyle.Hidden;\r
+\r
+            Process hbproc = Process.Start(hbGetPresets);\r
+            hbproc.WaitForExit();\r
+            hbproc.Dispose();\r
+            hbproc.Close();\r
+        }\r
+\r
+        /// <summary>\r
         /// Function which generates the filename and path automatically based on \r
         /// the Source Name, DVD title and DVD Chapters\r
         /// </summary>\r
@@ -166,6 +225,20 @@ namespace Handbrake.Functions
 \r
             mainWindow.drp_videoEncoder.Text = presetQuery.VideoEncoder;\r
 \r
+            if (presetQuery.Format != null)\r
+            {\r
+                if (presetQuery.Format == "mp4")\r
+                    mainWindow.drop_format.SelectedIndex = 0;\r
+                else if (presetQuery.Format == "m4v")\r
+                    mainWindow.drop_format.SelectedIndex = 1;\r
+                else if (presetQuery.Format == "mkv")\r
+                    mainWindow.drop_format.SelectedIndex = 2;\r
+                else if (presetQuery.Format == "avi")\r
+                    mainWindow.drop_format.SelectedIndex = 3;\r
+                else if (presetQuery.Format == "ogm")\r
+                    mainWindow.drop_format.SelectedIndex = 4;\r
+            }\r
+\r
             if (presetQuery.IpodAtom == true)\r
                 mainWindow.check_iPodAtom.CheckState = CheckState.Checked;\r
             else\r
@@ -178,6 +251,8 @@ namespace Handbrake.Functions
 \r
             #endregion\r
 \r
+\r
+\r
             // Picture Settings Tab\r
             #region Picture\r
             mainWindow.drp_crop.SelectedIndex = 1;\r
@@ -718,7 +793,7 @@ namespace Handbrake.Functions
 \r
                 // Now set the longest title in the gui.\r
                 mainWindow.drp_dvdtitle.SelectedItem = title2Select;\r
-            }  \r
+            }\r
         }\r
 \r
         // Generates part of the CLI query, for the tabbed components only.\r
similarity index 77%
rename from win/C#/Functions/CLI.cs
rename to win/C#/Functions/Encode.cs
index 259397a..eb12635 100644 (file)
@@ -15,7 +15,7 @@ using System.Runtime.InteropServices;
 \r
 namespace Handbrake.Functions\r
 {\r
-    public class CLI\r
+    public class Encode\r
     {       \r
         /// <summary>\r
         /// CLI output is based on en-US locale,\r
@@ -42,7 +42,8 @@ namespace Handbrake.Functions
                 string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");\r
                 string logPath = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");\r
 \r
-                string strCmdLine = String.Format(@"cmd /c """"{0}"" {1} 2>""{2}"" """, handbrakeCLIPath, query, logPath);\r
+                string strCmdLine = String.Format(@" cmd /c """"{0}"" {1} 2>""{2}"" """, handbrakeCLIPath, query, logPath);\r
+                //string arguments = String.Format(@"{0} 2>""{1}""", query, logPath);\r
 \r
                 ProcessStartInfo cliStart = new ProcessStartInfo("CMD.exe", strCmdLine);\r
 \r
@@ -71,9 +72,9 @@ namespace Handbrake.Functions
                         break;\r
                 }\r
             }\r
-            catch\r
+            catch (Exception exc)\r
             {\r
-                MessageBox.Show("Internal Software Error. Please Restart the Program");\r
+                MessageBox.Show("Internal Software Error. Please Restart the Program.  Error Information: \n\n" + exc.ToString());\r
             }\r
             return hbProc;\r
         }\r
@@ -110,24 +111,5 @@ namespace Handbrake.Functions
                     break;\r
             }\r
         }\r
-\r
-        /// <summary>\r
-        /// Update the presets.dat file with the latest version of HandBrak's presets from the CLI\r
-        /// </summary>\r
-        public void grabCLIPresets()\r
-        {\r
-            string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");\r
-            string presetsPath = Path.Combine(Application.StartupPath, "presets.dat");\r
-\r
-            string strCmdLine = String.Format(@"cmd /c """"{0}"" --preset-list >""{1}"" 2>&1""", handbrakeCLIPath, presetsPath);\r
-\r
-            ProcessStartInfo hbGetPresets = new ProcessStartInfo("CMD.exe", strCmdLine);\r
-            hbGetPresets.WindowStyle = ProcessWindowStyle.Hidden;\r
-\r
-            Process hbproc = Process.Start(hbGetPresets);\r
-            hbproc.WaitForExit();\r
-            hbproc.Dispose();\r
-            hbproc.Close();\r
-        }\r
     }\r
 }\r
index c7998c5..8970a56 100644 (file)
@@ -1010,7 +1010,7 @@ namespace Handbrake.Functions
                 double qConvert = 0;\r
                 if (videoQuality.Success != false)\r
                 {\r
-                    qConvert = double.Parse(videoQuality.ToString().Replace("-q ", ""), Functions.CLI.Culture) * 100;\r
+                    qConvert = double.Parse(videoQuality.ToString().Replace("-q ", ""), Functions.Encode.Culture) * 100;\r
                     qConvert = System.Math.Ceiling(qConvert);\r
                     thisQuery.q_videoQuality = int.Parse(qConvert.ToString());\r
                 }\r
index 96ae919..cb4fa72 100644 (file)
@@ -19,6 +19,7 @@
     </UpgradeBackupLocation>\r
     <OldToolsVersion>2.0</OldToolsVersion>\r
     <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>\r
+    <IsWebBootstrapper>false</IsWebBootstrapper>\r
     <PublishUrl>publish\</PublishUrl>\r
     <Install>true</Install>\r
     <InstallFrom>Disk</InstallFrom>\r
@@ -31,7 +32,6 @@
     <MapFileExtensions>true</MapFileExtensions>\r
     <ApplicationRevision>0</ApplicationRevision>\r
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>\r
-    <IsWebBootstrapper>false</IsWebBootstrapper>\r
     <UseApplicationTrust>false</UseApplicationTrust>\r
     <BootstrapperEnabled>true</BootstrapperEnabled>\r
   </PropertyGroup>\r
     <Compile Include="Functions\Presets.cs" />\r
     <Compile Include="Functions\Queue.cs" />\r
     <Compile Include="Functions\RssReader.cs" />\r
-    <Compile Include="Functions\CLI.cs" />\r
+    <Compile Include="Functions\Encode.cs" />\r
     <Compile Include="Functions\QueryParser.cs" />\r
     <Compile Include="Functions\x264Panel.cs" />\r
     <Compile Include="Parsing\AudioTrack.cs" />\r
     <None Include="Resources\logo128.png" />\r
     <None Include="Resources\ActivityWindow.png" />\r
     <None Include="Resources\AddToQueue.png" />\r
+    <Content Include="Resources\ActivityWindow_small.png" />\r
+    <Content Include="Resources\disc_small.png" />\r
     <Content Include="Resources\JobPassLarge.png" />\r
     <Content Include="Resources\Output_Small.png" />\r
     <None Include="Resources\Pause.png" />\r
index 7582daa..5d21d89 100644 (file)
@@ -162,7 +162,7 @@ namespace Handbrake.Parsing
                 if (m.Success)\r
                 {\r
                     thisTitle.m_resolution = new Size(int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));\r
-                    thisTitle.m_aspectRatio = float.Parse(m.Groups[3].Value, Functions.CLI.Culture);\r
+                    thisTitle.m_aspectRatio = float.Parse(m.Groups[3].Value, Functions.Encode.Culture);\r
                 }\r
 \r
                 // Get autocrop region for this title\r
index ff3fd0b..60a12a5 100644 (file)
@@ -67,6 +67,13 @@ namespace Handbrake.Properties {
             }\r
         }\r
         \r
+        internal static System.Drawing.Bitmap ActivityWindow_small {\r
+            get {\r
+                object obj = ResourceManager.GetObject("ActivityWindow_small", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
         internal static System.Drawing.Bitmap AddToQueue {\r
             get {\r
                 object obj = ResourceManager.GetObject("AddToQueue", resourceCulture);\r
@@ -88,6 +95,13 @@ namespace Handbrake.Properties {
             }\r
         }\r
         \r
+        internal static System.Drawing.Bitmap disc_small {\r
+            get {\r
+                object obj = ResourceManager.GetObject("disc_small", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
         internal static System.Drawing.Bitmap Emoticon {\r
             get {\r
                 object obj = ResourceManager.GetObject("Emoticon", resourceCulture);\r
index 081c86c..7f07815 100644 (file)
   <data name="AddToQueue" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
     <value>..\Resources\AddToQueue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
   </data>\r
+  <data name="disc_small" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\resources\disc_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="ActivityWindow_small" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\resources\activitywindow_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 2b5849b..0e4f389 100644 (file)
@@ -73,7 +73,7 @@ namespace Handbrake.Properties {
         \r
         [global::System.Configuration.UserScopedSettingAttribute()]\r
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-        [global::System.Configuration.DefaultSettingValueAttribute("SVN1544")]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("{hb_version}")]\r
         public string hb_version {\r
             get {\r
                 return ((string)(this["hb_version"]));\r
@@ -121,7 +121,7 @@ namespace Handbrake.Properties {
         \r
         [global::System.Configuration.UserScopedSettingAttribute()]\r
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-        [global::System.Configuration.DefaultSettingValueAttribute("2008053100")]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("0")]\r
         public int hb_build {\r
             get {\r
                 return ((int)(this["hb_build"]));\r
index 21ce3ce..ccaf53b 100644 (file)
@@ -15,7 +15,7 @@
       <Value Profile="(Default)">Checked</Value>\r
     </Setting>\r
     <Setting Name="hb_version" Type="System.String" Scope="User">\r
-      <Value Profile="(Default)">SVN1544</Value>\r
+      <Value Profile="(Default)">{hb_version}</Value>\r
     </Setting>\r
     <Setting Name="tooltipEnable" Type="System.String" Scope="User">\r
       <Value Profile="(Default)">Checked</Value>\r
@@ -27,7 +27,7 @@
       <Value Profile="(Default)">Checked</Value>\r
     </Setting>\r
     <Setting Name="hb_build" Type="System.Int32" Scope="User">\r
-      <Value Profile="(Default)">2008053100</Value>\r
+      <Value Profile="(Default)">0</Value>\r
     </Setting>\r
     <Setting Name="skipversion" Type="System.Int32" Scope="User">\r
       <Value Profile="(Default)">0</Value>\r
diff --git a/win/C#/Resources/ActivityWindow_small.png b/win/C#/Resources/ActivityWindow_small.png
new file mode 100644 (file)
index 0000000..916b6ef
Binary files /dev/null and b/win/C#/Resources/ActivityWindow_small.png differ
diff --git a/win/C#/Resources/disc_small.png b/win/C#/Resources/disc_small.png
new file mode 100644 (file)
index 0000000..dca0ad2
Binary files /dev/null and b/win/C#/Resources/disc_small.png differ
index 44aab93..329066a 100644 (file)
@@ -20,7 +20,7 @@
                 <value>Checked</value>\r
             </setting>\r
             <setting name="hb_version" serializeAs="String">\r
-                <value>SVN1544</value>\r
+                <value>{hb_version}</value>\r
             </setting>\r
             <setting name="tooltipEnable" serializeAs="String">\r
                 <value>Checked</value>\r
@@ -32,7 +32,7 @@
                 <value>Checked</value>\r
             </setting>\r
             <setting name="hb_build" serializeAs="String">\r
-                <value>2008053100</value>\r
+                <value>0</value>\r
             </setting>\r
             <setting name="skipversion" serializeAs="String">\r
                 <value>0</value>\r
index 14dfb36..aec3f8f 100644 (file)
@@ -90,15 +90,11 @@ namespace Handbrake
             this.File_Open = new System.Windows.Forms.OpenFileDialog();\r
             this.ISO_Open = new System.Windows.Forms.OpenFileDialog();\r
             this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.mnu_open = new System.Windows.Forms.ToolStripMenuItem();\r
             this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();\r
             this.mnu_exit = new System.Windows.Forms.ToolStripMenuItem();\r
             this.mnu_open3 = new System.Windows.Forms.ToolStripMenuItem();\r
             this.ToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.mnu_encode = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.mnu_viewDVDdata = new System.Windows.Forms.ToolStripMenuItem();\r
             this.ToolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();\r
-            this.mnu_options = new System.Windows.Forms.ToolStripMenuItem();\r
             this.PresetsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
             this.mnu_presetReset = new System.Windows.Forms.ToolStripMenuItem();\r
             this.mnu_delete_preset = new System.Windows.Forms.ToolStripMenuItem();\r
@@ -239,7 +235,6 @@ namespace Handbrake
             this.check_mixedReferences = new System.Windows.Forms.CheckBox();\r
             this.tabPage4 = new System.Windows.Forms.TabPage();\r
             this.btn_clear = new System.Windows.Forms.Button();\r
-            this.btn_copy2C = new System.Windows.Forms.Button();\r
             this.label34 = new System.Windows.Forms.Label();\r
             this.btn_generate_Query = new System.Windows.Forms.Button();\r
             this.label33 = new System.Windows.Forms.Label();\r
@@ -249,21 +244,29 @@ namespace Handbrake
             this.groupBox2 = new System.Windows.Forms.GroupBox();\r
             this.treeView_presets = new System.Windows.Forms.TreeView();\r
             this.toolStrip1 = new System.Windows.Forms.ToolStrip();\r
+            this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.lbl_encode = new System.Windows.Forms.ToolStripLabel();\r
+            this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);\r
+            this.drop_format = new System.Windows.Forms.ComboBox();\r
+            this.label5 = new System.Windows.Forms.Label();\r
             this.btn_source = new System.Windows.Forms.ToolStripDropDownButton();\r
-            this.btn_dvd_source = new System.Windows.Forms.ToolStripMenuItem();\r
             this.btn_file_source = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.btn_dvd_source = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();\r
             this.mnu_dvd_drive = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();\r
             this.btn_start = new System.Windows.Forms.ToolStripButton();\r
             this.btn_add2Queue = new System.Windows.Forms.ToolStripButton();\r
             this.btn_showQueue = new System.Windows.Forms.ToolStripButton();\r
-            this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();\r
             this.btn_ActivityWindow = new System.Windows.Forms.ToolStripButton();\r
-            this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();\r
             this.btn_minimize = new System.Windows.Forms.ToolStripButton();\r
-            this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();\r
-            this.lbl_encode = new System.Windows.Forms.ToolStripLabel();\r
-            this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);\r
+            this.mnu_open = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_encode = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_encodeLog = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_viewDVDdata = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_options = new System.Windows.Forms.ToolStripMenuItem();\r
             Label38 = new System.Windows.Forms.Label();\r
             notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
             notifyIconMenu.SuspendLayout();\r
@@ -297,7 +300,7 @@ namespace Handbrake
             Label38.AutoSize = true;\r
             Label38.BackColor = System.Drawing.Color.Transparent;\r
             Label38.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            Label38.Location = new System.Drawing.Point(304, 65);\r
+            Label38.Location = new System.Drawing.Point(334, 38);\r
             Label38.Name = "Label38";\r
             Label38.Size = new System.Drawing.Size(108, 13);\r
             Label38.TabIndex = 11;\r
@@ -403,9 +406,9 @@ namespace Handbrake
             "MPEG-4 (XviD)",\r
             "H.264 (x264)",\r
             "VP3 (Theora)"});\r
-            this.drp_videoEncoder.Location = new System.Drawing.Point(99, 20);\r
+            this.drp_videoEncoder.Location = new System.Drawing.Point(125, 35);\r
             this.drp_videoEncoder.Name = "drp_videoEncoder";\r
-            this.drp_videoEncoder.Size = new System.Drawing.Size(156, 21);\r
+            this.drp_videoEncoder.Size = new System.Drawing.Size(126, 21);\r
             this.drp_videoEncoder.TabIndex = 1;\r
             this.ToolTip.SetToolTip(this.drp_videoEncoder, "Select a video encoder");\r
             this.drp_videoEncoder.SelectedIndexChanged += new System.EventHandler(this.drp_videoEncoder_SelectedIndexChanged);\r
@@ -455,7 +458,7 @@ namespace Handbrake
             this.check_largeFile.AutoSize = true;\r
             this.check_largeFile.BackColor = System.Drawing.Color.Transparent;\r
             this.check_largeFile.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_largeFile.Location = new System.Drawing.Point(261, 23);\r
+            this.check_largeFile.Location = new System.Drawing.Point(193, 22);\r
             this.check_largeFile.Name = "check_largeFile";\r
             this.check_largeFile.Size = new System.Drawing.Size(82, 17);\r
             this.check_largeFile.TabIndex = 4;\r
@@ -470,7 +473,7 @@ namespace Handbrake
             this.check_turbo.BackColor = System.Drawing.Color.Transparent;\r
             this.check_turbo.Enabled = false;\r
             this.check_turbo.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_turbo.Location = new System.Drawing.Point(37, 151);\r
+            this.check_turbo.Location = new System.Drawing.Point(37, 184);\r
             this.check_turbo.Name = "check_turbo";\r
             this.check_turbo.Size = new System.Drawing.Size(115, 17);\r
             this.check_turbo.TabIndex = 7;\r
@@ -492,7 +495,7 @@ namespace Handbrake
             "24",\r
             "25",\r
             "29.97"});\r
-            this.drp_videoFramerate.Location = new System.Drawing.Point(125, 35);\r
+            this.drp_videoFramerate.Location = new System.Drawing.Point(125, 68);\r
             this.drp_videoFramerate.Name = "drp_videoFramerate";\r
             this.drp_videoFramerate.Size = new System.Drawing.Size(126, 21);\r
             this.drp_videoFramerate.TabIndex = 2;\r
@@ -501,7 +504,7 @@ namespace Handbrake
             // \r
             // slider_videoQuality\r
             // \r
-            this.slider_videoQuality.Location = new System.Drawing.Point(435, 90);\r
+            this.slider_videoQuality.Location = new System.Drawing.Point(468, 91);\r
             this.slider_videoQuality.Maximum = 100;\r
             this.slider_videoQuality.Name = "slider_videoQuality";\r
             this.slider_videoQuality.Size = new System.Drawing.Size(167, 42);\r
@@ -513,7 +516,7 @@ namespace Handbrake
             // text_filesize\r
             // \r
             this.text_filesize.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.text_filesize.Location = new System.Drawing.Point(446, 63);\r
+            this.text_filesize.Location = new System.Drawing.Point(476, 36);\r
             this.text_filesize.Name = "text_filesize";\r
             this.text_filesize.Size = new System.Drawing.Size(81, 21);\r
             this.text_filesize.TabIndex = 12;\r
@@ -523,7 +526,7 @@ namespace Handbrake
             // text_bitrate\r
             // \r
             this.text_bitrate.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.text_bitrate.Location = new System.Drawing.Point(446, 36);\r
+            this.text_bitrate.Location = new System.Drawing.Point(476, 63);\r
             this.text_bitrate.Name = "text_bitrate";\r
             this.text_bitrate.Size = new System.Drawing.Size(81, 21);\r
             this.text_bitrate.TabIndex = 10;\r
@@ -607,7 +610,7 @@ namespace Handbrake
             this.check_optimiseMP4.AutoSize = true;\r
             this.check_optimiseMP4.BackColor = System.Drawing.Color.Transparent;\r
             this.check_optimiseMP4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_optimiseMP4.Location = new System.Drawing.Point(349, 23);\r
+            this.check_optimiseMP4.Location = new System.Drawing.Point(281, 22);\r
             this.check_optimiseMP4.Name = "check_optimiseMP4";\r
             this.check_optimiseMP4.Size = new System.Drawing.Size(143, 17);\r
             this.check_optimiseMP4.TabIndex = 25;\r
@@ -622,7 +625,7 @@ namespace Handbrake
             this.check_iPodAtom.AutoSize = true;\r
             this.check_iPodAtom.BackColor = System.Drawing.Color.Transparent;\r
             this.check_iPodAtom.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_iPodAtom.Location = new System.Drawing.Point(498, 23);\r
+            this.check_iPodAtom.Location = new System.Drawing.Point(430, 22);\r
             this.check_iPodAtom.Name = "check_iPodAtom";\r
             this.check_iPodAtom.Size = new System.Drawing.Size(122, 17);\r
             this.check_iPodAtom.TabIndex = 26;\r
@@ -1021,16 +1024,6 @@ namespace Handbrake
             this.FileToolStripMenuItem.Size = new System.Drawing.Size(38, 20);\r
             this.FileToolStripMenuItem.Text = "&File";\r
             // \r
-            // mnu_open\r
-            // \r
-            this.mnu_open.Image = ((System.Drawing.Image)(resources.GetObject("mnu_open.Image")));\r
-            this.mnu_open.ImageTransparentColor = System.Drawing.Color.Magenta;\r
-            this.mnu_open.Name = "mnu_open";\r
-            this.mnu_open.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));\r
-            this.mnu_open.Size = new System.Drawing.Size(210, 22);\r
-            this.mnu_open.Text = "&Import Preset";\r
-            this.mnu_open.Click += new System.EventHandler(this.mnu_open_Click);\r
-            // \r
             // toolStripSeparator2\r
             // \r
             this.toolStripSeparator2.Name = "toolStripSeparator2";\r
@@ -1052,6 +1045,7 @@ namespace Handbrake
             // \r
             this.ToolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
             this.mnu_encode,\r
+            this.mnu_encodeLog,\r
             this.mnu_viewDVDdata,\r
             this.ToolStripSeparator5,\r
             this.mnu_options});\r
@@ -1059,36 +1053,10 @@ namespace Handbrake
             this.ToolsToolStripMenuItem.Size = new System.Drawing.Size(49, 20);\r
             this.ToolsToolStripMenuItem.Text = "&Tools";\r
             // \r
-            // mnu_encode\r
-            // \r
-            this.mnu_encode.Image = global::Handbrake.Properties.Resources.Queue_Small;\r
-            this.mnu_encode.Name = "mnu_encode";\r
-            this.mnu_encode.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));\r
-            this.mnu_encode.Size = new System.Drawing.Size(217, 22);\r
-            this.mnu_encode.Text = "Show Queue";\r
-            this.mnu_encode.Click += new System.EventHandler(this.mnu_encode_Click);\r
-            // \r
-            // mnu_viewDVDdata\r
-            // \r
-            this.mnu_viewDVDdata.Image = global::Handbrake.Properties.Resources.Movies_Small;\r
-            this.mnu_viewDVDdata.Name = "mnu_viewDVDdata";\r
-            this.mnu_viewDVDdata.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));\r
-            this.mnu_viewDVDdata.Size = new System.Drawing.Size(217, 22);\r
-            this.mnu_viewDVDdata.Text = "View DVD data";\r
-            this.mnu_viewDVDdata.Click += new System.EventHandler(this.mnu_viewDVDdata_Click);\r
-            // \r
             // ToolStripSeparator5\r
             // \r
             this.ToolStripSeparator5.Name = "ToolStripSeparator5";\r
-            this.ToolStripSeparator5.Size = new System.Drawing.Size(214, 6);\r
-            // \r
-            // mnu_options\r
-            // \r
-            this.mnu_options.Image = global::Handbrake.Properties.Resources.Pref_Small;\r
-            this.mnu_options.Name = "mnu_options";\r
-            this.mnu_options.Size = new System.Drawing.Size(217, 22);\r
-            this.mnu_options.Text = "Options";\r
-            this.mnu_options.Click += new System.EventHandler(this.mnu_options_Click);\r
+            this.ToolStripSeparator5.Size = new System.Drawing.Size(248, 6);\r
             // \r
             // PresetsToolStripMenuItem\r
             // \r
@@ -1277,8 +1245,8 @@ namespace Handbrake
             // \r
             // groupBox_output\r
             // \r
-            this.groupBox_output.Controls.Add(this.drp_videoEncoder);\r
-            this.groupBox_output.Controls.Add(this.Label47);\r
+            this.groupBox_output.Controls.Add(this.drop_format);\r
+            this.groupBox_output.Controls.Add(this.label5);\r
             this.groupBox_output.Controls.Add(this.check_largeFile);\r
             this.groupBox_output.Controls.Add(this.check_iPodAtom);\r
             this.groupBox_output.Controls.Add(this.check_optimiseMP4);\r
@@ -1296,11 +1264,11 @@ namespace Handbrake
             this.Label47.AutoSize = true;\r
             this.Label47.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.Label47.ForeColor = System.Drawing.Color.Black;\r
-            this.Label47.Location = new System.Drawing.Point(17, 24);\r
+            this.Label47.Location = new System.Drawing.Point(13, 39);\r
             this.Label47.Name = "Label47";\r
-            this.Label47.Size = new System.Drawing.Size(62, 13);\r
+            this.Label47.Size = new System.Drawing.Size(84, 13);\r
             this.Label47.TabIndex = 0;\r
-            this.Label47.Text = "Encoder: ";\r
+            this.Label47.Text = "Video Codec:";\r
             // \r
             // Label3\r
             // \r
@@ -1683,6 +1651,8 @@ namespace Handbrake
             // TabPage3\r
             // \r
             this.TabPage3.BackColor = System.Drawing.Color.Transparent;\r
+            this.TabPage3.Controls.Add(this.drp_videoEncoder);\r
+            this.TabPage3.Controls.Add(this.Label47);\r
             this.TabPage3.Controls.Add(this.label25);\r
             this.TabPage3.Controls.Add(this.lbl_vfr);\r
             this.TabPage3.Controls.Add(this.check_grayscale);\r
@@ -1713,16 +1683,16 @@ namespace Handbrake
             this.label25.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.label25.Location = new System.Drawing.Point(13, 13);\r
             this.label25.Name = "label25";\r
-            this.label25.Size = new System.Drawing.Size(76, 13);\r
+            this.label25.Size = new System.Drawing.Size(43, 13);\r
             this.label25.TabIndex = 0;\r
-            this.label25.Text = "Framerate";\r
+            this.label25.Text = "Video";\r
             // \r
             // lbl_vfr\r
             // \r
             this.lbl_vfr.AutoSize = true;\r
             this.lbl_vfr.BackColor = System.Drawing.Color.Transparent;\r
             this.lbl_vfr.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.lbl_vfr.Location = new System.Drawing.Point(123, 64);\r
+            this.lbl_vfr.Location = new System.Drawing.Point(123, 97);\r
             this.lbl_vfr.Name = "lbl_vfr";\r
             this.lbl_vfr.Size = new System.Drawing.Size(52, 12);\r
             this.lbl_vfr.TabIndex = 3;\r
@@ -1734,7 +1704,7 @@ namespace Handbrake
             this.check_grayscale.AutoSize = true;\r
             this.check_grayscale.BackColor = System.Drawing.Color.Transparent;\r
             this.check_grayscale.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_grayscale.Location = new System.Drawing.Point(16, 105);\r
+            this.check_grayscale.Location = new System.Drawing.Point(16, 138);\r
             this.check_grayscale.Name = "check_grayscale";\r
             this.check_grayscale.Size = new System.Drawing.Size(138, 17);\r
             this.check_grayscale.TabIndex = 5;\r
@@ -1746,7 +1716,7 @@ namespace Handbrake
             this.Label22.AutoSize = true;\r
             this.Label22.BackColor = System.Drawing.Color.Transparent;\r
             this.Label22.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Label22.Location = new System.Drawing.Point(13, 85);\r
+            this.Label22.Location = new System.Drawing.Point(13, 118);\r
             this.Label22.Name = "Label22";\r
             this.Label22.Size = new System.Drawing.Size(191, 13);\r
             this.Label22.TabIndex = 4;\r
@@ -1757,7 +1727,7 @@ namespace Handbrake
             this.check_2PassEncode.AutoSize = true;\r
             this.check_2PassEncode.BackColor = System.Drawing.Color.Transparent;\r
             this.check_2PassEncode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_2PassEncode.Location = new System.Drawing.Point(16, 128);\r
+            this.check_2PassEncode.Location = new System.Drawing.Point(16, 161);\r
             this.check_2PassEncode.Name = "check_2PassEncode";\r
             this.check_2PassEncode.Size = new System.Drawing.Size(119, 17);\r
             this.check_2PassEncode.TabIndex = 6;\r
@@ -1770,7 +1740,7 @@ namespace Handbrake
             this.Label2.AutoSize = true;\r
             this.Label2.BackColor = System.Drawing.Color.Transparent;\r
             this.Label2.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Label2.Location = new System.Drawing.Point(304, 13);\r
+            this.Label2.Location = new System.Drawing.Point(334, 13);\r
             this.Label2.Name = "Label2";\r
             this.Label2.Size = new System.Drawing.Size(53, 13);\r
             this.Label2.TabIndex = 8;\r
@@ -1781,7 +1751,7 @@ namespace Handbrake
             this.Label42.AutoSize = true;\r
             this.Label42.BackColor = System.Drawing.Color.Transparent;\r
             this.Label42.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Label42.Location = new System.Drawing.Point(304, 38);\r
+            this.Label42.Location = new System.Drawing.Point(334, 65);\r
             this.Label42.Name = "Label42";\r
             this.Label42.Size = new System.Drawing.Size(117, 13);\r
             this.Label42.TabIndex = 9;\r
@@ -1792,7 +1762,7 @@ namespace Handbrake
             this.SliderValue.AutoSize = true;\r
             this.SliderValue.BackColor = System.Drawing.Color.Transparent;\r
             this.SliderValue.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.SliderValue.Location = new System.Drawing.Point(599, 96);\r
+            this.SliderValue.Location = new System.Drawing.Point(641, 100);\r
             this.SliderValue.Name = "SliderValue";\r
             this.SliderValue.Size = new System.Drawing.Size(23, 12);\r
             this.SliderValue.TabIndex = 15;\r
@@ -1803,7 +1773,7 @@ namespace Handbrake
             this.Label46.AutoSize = true;\r
             this.Label46.BackColor = System.Drawing.Color.Transparent;\r
             this.Label46.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Label46.Location = new System.Drawing.Point(13, 38);\r
+            this.Label46.Location = new System.Drawing.Point(13, 71);\r
             this.Label46.Name = "Label46";\r
             this.Label46.Size = new System.Drawing.Size(106, 13);\r
             this.Label46.TabIndex = 1;\r
@@ -1814,7 +1784,7 @@ namespace Handbrake
             this.Label40.AutoSize = true;\r
             this.Label40.BackColor = System.Drawing.Color.Transparent;\r
             this.Label40.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Label40.Location = new System.Drawing.Point(304, 95);\r
+            this.Label40.Location = new System.Drawing.Point(334, 99);\r
             this.Label40.Name = "Label40";\r
             this.Label40.Size = new System.Drawing.Size(107, 13);\r
             this.Label40.TabIndex = 13;\r
@@ -2748,7 +2718,6 @@ namespace Handbrake
             // tabPage4\r
             // \r
             this.tabPage4.Controls.Add(this.btn_clear);\r
-            this.tabPage4.Controls.Add(this.btn_copy2C);\r
             this.tabPage4.Controls.Add(this.label34);\r
             this.tabPage4.Controls.Add(this.btn_generate_Query);\r
             this.tabPage4.Controls.Add(this.label33);\r
@@ -2772,19 +2741,6 @@ namespace Handbrake
             this.btn_clear.UseVisualStyleBackColor = true;\r
             this.btn_clear.Click += new System.EventHandler(this.btn_clear_Click);\r
             // \r
-            // btn_copy2C\r
-            // \r
-            this.btn_copy2C.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
-            this.btn_copy2C.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.btn_copy2C.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_copy2C.Location = new System.Drawing.Point(148, 75);\r
-            this.btn_copy2C.Name = "btn_copy2C";\r
-            this.btn_copy2C.Size = new System.Drawing.Size(136, 22);\r
-            this.btn_copy2C.TabIndex = 3;\r
-            this.btn_copy2C.Text = "Copy to clipboard";\r
-            this.btn_copy2C.UseVisualStyleBackColor = true;\r
-            this.btn_copy2C.Click += new System.EventHandler(this.btn_copy2C_Click);\r
-            // \r
             // label34\r
             // \r
             this.label34.AutoSize = true;\r
@@ -2903,11 +2859,78 @@ namespace Handbrake
             this.toolStrip1.TabIndex = 0;\r
             this.toolStrip1.Text = "toolStrip1";\r
             // \r
+            // toolStripSeparator10\r
+            // \r
+            this.toolStripSeparator10.Name = "toolStripSeparator10";\r
+            this.toolStripSeparator10.Size = new System.Drawing.Size(6, 39);\r
+            // \r
+            // toolStripSeparator4\r
+            // \r
+            this.toolStripSeparator4.Name = "toolStripSeparator4";\r
+            this.toolStripSeparator4.Size = new System.Drawing.Size(6, 39);\r
+            // \r
+            // toolStripSeparator8\r
+            // \r
+            this.toolStripSeparator8.Name = "toolStripSeparator8";\r
+            this.toolStripSeparator8.Size = new System.Drawing.Size(6, 39);\r
+            // \r
+            // toolStripSeparator9\r
+            // \r
+            this.toolStripSeparator9.Name = "toolStripSeparator9";\r
+            this.toolStripSeparator9.Size = new System.Drawing.Size(6, 39);\r
+            // \r
+            // lbl_encode\r
+            // \r
+            this.lbl_encode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_encode.Name = "lbl_encode";\r
+            this.lbl_encode.Size = new System.Drawing.Size(148, 36);\r
+            this.lbl_encode.Text = "Encoding: Not Started";\r
+            // \r
+            // notifyIcon\r
+            // \r
+            this.notifyIcon.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info;\r
+            this.notifyIcon.BalloonTipText = "HandBrake Status Here";\r
+            this.notifyIcon.BalloonTipTitle = "HandBrake";\r
+            this.notifyIcon.ContextMenuStrip = notifyIconMenu;\r
+            this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));\r
+            this.notifyIcon.Text = "HandBrake";\r
+            this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseDoubleClick);\r
+            // \r
+            // drop_format\r
+            // \r
+            this.drop_format.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_format.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drop_format.FormattingEnabled = true;\r
+            this.drop_format.Items.AddRange(new object[] {\r
+            "MP4 File",\r
+            "M4V File",\r
+            "MKV File",\r
+            "AVI File",\r
+            "OGM File"});\r
+            this.drop_format.Location = new System.Drawing.Point(75, 19);\r
+            this.drop_format.Name = "drop_format";\r
+            this.drop_format.Size = new System.Drawing.Size(106, 21);\r
+            this.drop_format.TabIndex = 28;\r
+            this.ToolTip.SetToolTip(this.drop_format, "Select a video encoder");\r
+            this.drop_format.SelectedIndexChanged += new System.EventHandler(this.drop_format_SelectedIndexChanged);\r
+            // \r
+            // label5\r
+            // \r
+            this.label5.AutoSize = true;\r
+            this.label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label5.ForeColor = System.Drawing.Color.Black;\r
+            this.label5.Location = new System.Drawing.Point(17, 23);\r
+            this.label5.Name = "label5";\r
+            this.label5.Size = new System.Drawing.Size(52, 13);\r
+            this.label5.TabIndex = 27;\r
+            this.label5.Text = "Format:";\r
+            // \r
             // btn_source\r
             // \r
             this.btn_source.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
-            this.btn_dvd_source,\r
             this.btn_file_source,\r
+            this.btn_dvd_source,\r
+            this.toolStripSeparator1,\r
             this.mnu_dvd_drive});\r
             this.btn_source.Image = global::Handbrake.Properties.Resources.Movies;\r
             this.btn_source.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
@@ -2917,34 +2940,37 @@ namespace Handbrake
             this.btn_source.Text = "Source";\r
             this.btn_source.Click += new System.EventHandler(this.btn_source_Click);\r
             // \r
+            // btn_file_source\r
+            // \r
+            this.btn_file_source.Image = global::Handbrake.Properties.Resources.Movies_Small;\r
+            this.btn_file_source.Name = "btn_file_source";\r
+            this.btn_file_source.Size = new System.Drawing.Size(194, 22);\r
+            this.btn_file_source.Text = "Video File";\r
+            this.btn_file_source.Click += new System.EventHandler(this.btn_file_source_Click);\r
+            // \r
             // btn_dvd_source\r
             // \r
+            this.btn_dvd_source.Image = ((System.Drawing.Image)(resources.GetObject("btn_dvd_source.Image")));\r
+            this.btn_dvd_source.ImageTransparentColor = System.Drawing.Color.Magenta;\r
             this.btn_dvd_source.Name = "btn_dvd_source";\r
-            this.btn_dvd_source.Size = new System.Drawing.Size(197, 22);\r
-            this.btn_dvd_source.Text = "DVD / VIDEO_TS Folder";\r
+            this.btn_dvd_source.Size = new System.Drawing.Size(194, 22);\r
+            this.btn_dvd_source.Text = "DVD/ VIDEO_TS Folder";\r
             this.btn_dvd_source.Click += new System.EventHandler(this.btn_dvd_source_Click);\r
             // \r
-            // btn_file_source\r
+            // toolStripSeparator1\r
             // \r
-            this.btn_file_source.Name = "btn_file_source";\r
-            this.btn_file_source.Size = new System.Drawing.Size(197, 22);\r
-            this.btn_file_source.Text = "Video File";\r
-            this.btn_file_source.Click += new System.EventHandler(this.btn_file_source_Click);\r
+            this.toolStripSeparator1.Name = "toolStripSeparator1";\r
+            this.toolStripSeparator1.Size = new System.Drawing.Size(191, 6);\r
             // \r
             // mnu_dvd_drive\r
             // \r
-            this.mnu_dvd_drive.Image = global::Handbrake.Properties.Resources.Disc;\r
+            this.mnu_dvd_drive.Image = global::Handbrake.Properties.Resources.disc_small;\r
             this.mnu_dvd_drive.Name = "mnu_dvd_drive";\r
-            this.mnu_dvd_drive.Size = new System.Drawing.Size(197, 22);\r
+            this.mnu_dvd_drive.Size = new System.Drawing.Size(194, 22);\r
             this.mnu_dvd_drive.Text = "[No DVD Drive Ready]";\r
             this.mnu_dvd_drive.Visible = false;\r
             this.mnu_dvd_drive.Click += new System.EventHandler(this.mnu_dvd_drive_Click);\r
             // \r
-            // toolStripSeparator10\r
-            // \r
-            this.toolStripSeparator10.Name = "toolStripSeparator10";\r
-            this.toolStripSeparator10.Size = new System.Drawing.Size(6, 39);\r
-            // \r
             // btn_start\r
             // \r
             this.btn_start.Image = global::Handbrake.Properties.Resources.Play;\r
@@ -2978,11 +3004,6 @@ namespace Handbrake
             this.btn_showQueue.Text = "Show Queue";\r
             this.btn_showQueue.Click += new System.EventHandler(this.btn_showQueue_Click);\r
             // \r
-            // toolStripSeparator4\r
-            // \r
-            this.toolStripSeparator4.Name = "toolStripSeparator4";\r
-            this.toolStripSeparator4.Size = new System.Drawing.Size(6, 39);\r
-            // \r
             // btn_ActivityWindow\r
             // \r
             this.btn_ActivityWindow.Image = global::Handbrake.Properties.Resources.ActivityWindow;\r
@@ -2995,11 +3016,6 @@ namespace Handbrake
                 "ently running encode.";\r
             this.btn_ActivityWindow.Click += new System.EventHandler(this.btn_ActivityWindow_Click);\r
             // \r
-            // toolStripSeparator8\r
-            // \r
-            this.toolStripSeparator8.Name = "toolStripSeparator8";\r
-            this.toolStripSeparator8.Size = new System.Drawing.Size(6, 39);\r
-            // \r
             // btn_minimize\r
             // \r
             this.btn_minimize.Image = ((System.Drawing.Image)(resources.GetObject("btn_minimize.Image")));\r
@@ -3009,27 +3025,48 @@ namespace Handbrake
             this.btn_minimize.Text = "Minimize To Taskbar";\r
             this.btn_minimize.Click += new System.EventHandler(this.btn_minimize_Click);\r
             // \r
-            // toolStripSeparator9\r
+            // mnu_open\r
             // \r
-            this.toolStripSeparator9.Name = "toolStripSeparator9";\r
-            this.toolStripSeparator9.Size = new System.Drawing.Size(6, 39);\r
+            this.mnu_open.Image = ((System.Drawing.Image)(resources.GetObject("mnu_open.Image")));\r
+            this.mnu_open.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.mnu_open.Name = "mnu_open";\r
+            this.mnu_open.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));\r
+            this.mnu_open.Size = new System.Drawing.Size(210, 22);\r
+            this.mnu_open.Text = "&Import Preset";\r
+            this.mnu_open.Click += new System.EventHandler(this.mnu_open_Click);\r
             // \r
-            // lbl_encode\r
+            // mnu_encode\r
             // \r
-            this.lbl_encode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.lbl_encode.Name = "lbl_encode";\r
-            this.lbl_encode.Size = new System.Drawing.Size(148, 36);\r
-            this.lbl_encode.Text = "Encoding: Not Started";\r
+            this.mnu_encode.Image = global::Handbrake.Properties.Resources.Queue_Small;\r
+            this.mnu_encode.Name = "mnu_encode";\r
+            this.mnu_encode.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));\r
+            this.mnu_encode.Size = new System.Drawing.Size(251, 22);\r
+            this.mnu_encode.Text = "Show Queue";\r
+            this.mnu_encode.Click += new System.EventHandler(this.mnu_encode_Click);\r
             // \r
-            // notifyIcon\r
+            // mnu_encodeLog\r
             // \r
-            this.notifyIcon.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info;\r
-            this.notifyIcon.BalloonTipText = "HandBrake Status Here";\r
-            this.notifyIcon.BalloonTipTitle = "HandBrake";\r
-            this.notifyIcon.ContextMenuStrip = notifyIconMenu;\r
-            this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));\r
-            this.notifyIcon.Text = "HandBrake";\r
-            this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseDoubleClick);\r
+            this.mnu_encodeLog.Image = global::Handbrake.Properties.Resources.ActivityWindow_small;\r
+            this.mnu_encodeLog.Name = "mnu_encodeLog";\r
+            this.mnu_encodeLog.Size = new System.Drawing.Size(251, 22);\r
+            this.mnu_encodeLog.Text = "Activity Window (Encode log)";\r
+            this.mnu_encodeLog.Click += new System.EventHandler(this.mnu_encodeLog_Click);\r
+            // \r
+            // mnu_viewDVDdata\r
+            // \r
+            this.mnu_viewDVDdata.Image = global::Handbrake.Properties.Resources.Movies_Small;\r
+            this.mnu_viewDVDdata.Name = "mnu_viewDVDdata";\r
+            this.mnu_viewDVDdata.Size = new System.Drawing.Size(251, 22);\r
+            this.mnu_viewDVDdata.Text = "Activity Window (Scan log)";\r
+            this.mnu_viewDVDdata.Click += new System.EventHandler(this.mnu_viewDVDdata_Click);\r
+            // \r
+            // mnu_options\r
+            // \r
+            this.mnu_options.Image = global::Handbrake.Properties.Resources.Pref_Small;\r
+            this.mnu_options.Name = "mnu_options";\r
+            this.mnu_options.Size = new System.Drawing.Size(251, 22);\r
+            this.mnu_options.Text = "Options";\r
+            this.mnu_options.Click += new System.EventHandler(this.mnu_options_Click);\r
             // \r
             // frmMain\r
             // \r
@@ -3202,7 +3239,6 @@ namespace Handbrake
         internal System.Windows.Forms.Button btn_generate_Query;\r
         internal System.Windows.Forms.Label label33;\r
         internal System.Windows.Forms.Button btn_clear;\r
-        internal System.Windows.Forms.Button btn_copy2C;\r
         private System.Windows.Forms.ToolStrip toolStrip1;\r
         private System.Windows.Forms.ToolStripButton btn_start;\r
         private System.Windows.Forms.ToolStripButton btn_add2Queue;\r
@@ -3307,7 +3343,6 @@ namespace Handbrake
         internal System.Windows.Forms.Label lbl_duration;\r
         internal System.Windows.Forms.Label label_duration;\r
         private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;\r
-        private System.Windows.Forms.ToolStripMenuItem btn_dvd_source;\r
         private System.Windows.Forms.ToolStripMenuItem btn_file_source;\r
         private System.Windows.Forms.ToolStripLabel lbl_encode;\r
         private System.Windows.Forms.ToolStripMenuItem mnu_delete_preset;\r
@@ -3316,6 +3351,11 @@ namespace Handbrake
         private System.Windows.Forms.ToolStripMenuItem mnu_user_guide;\r
         private System.Windows.Forms.ToolStripMenuItem mnu_dvd_drive;\r
         private System.Windows.Forms.ToolStripDropDownButton btn_source;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;\r
+        private System.Windows.Forms.ToolStripMenuItem btn_dvd_source;\r
+        internal System.Windows.Forms.ComboBox drop_format;\r
+        internal System.Windows.Forms.Label label5;\r
+        internal System.Windows.Forms.ToolStripMenuItem mnu_encodeLog;\r
 \r
     }\r
 }
\ No newline at end of file
index 9f8041f..70b5649 100644 (file)
@@ -24,7 +24,7 @@ namespace Handbrake
         // Declarations *******************************************************\r
         Functions.Common hb_common_func = new Functions.Common();\r
         Functions.x264Panel x264PanelFunctions = new Functions.x264Panel();\r
-        Functions.CLI cliObj = new Functions.CLI();\r
+        Functions.Encode cliObj = new Functions.Encode();\r
         Functions.Queue encodeQueue = new Functions.Queue();\r
         Parsing.Title selectedTitle;\r
         Functions.Presets presetHandler = new Functions.Presets();\r
@@ -55,6 +55,20 @@ namespace Handbrake
 \r
             InitializeComponent();\r
 \r
+            // Update the users config file with the CLI version data.\r
+            lblStatus.Text = "Setting Version Data ...";\r
+            Application.DoEvents();\r
+            ArrayList x = hb_common_func.getCliVersionData();\r
+            if (x != null)\r
+            {\r
+                try\r
+                {\r
+                    Properties.Settings.Default.hb_build = int.Parse(x[1].ToString());\r
+                    Properties.Settings.Default.hb_version = x[0].ToString();\r
+                }\r
+                catch (Exception) { /* Do Nothing */ }\r
+            }\r
+\r
             // show the form, but leave disabled until preloading is complete then show the main form\r
             this.Enabled = false;\r
             this.Show();\r
@@ -70,37 +84,22 @@ namespace Handbrake
                 Thread.Sleep(100);\r
             }\r
 \r
-            //H264 Panel Loading\r
-            lblStatus.Text = "Loading H264 Panel ...";\r
-            Application.DoEvents();\r
-            setupH264Panel();\r
-            Thread.Sleep(100);\r
-\r
-            // Load the presets\r
-            // Set some defaults for the dropdown menus. Just incase the normal or user presets dont load.\r
-            lblStatus.Text = "Loading Presets Bar ...";\r
-            Application.DoEvents();\r
-            drp_crop.SelectedIndex = 0;\r
-            loadPresetPanel();\r
-            Thread.Sleep(200);\r
-\r
-            // Now load the users default if required. (Will overide the above setting)\r
-            lblStatus.Text = "Loading Preset Settings ...";\r
+            // Setup the GUI components\r
+            lblStatus.Text = "Setting up the GUI ...";\r
             Application.DoEvents();\r
+            setupH264Panel();               // Initalize the H.264 Panel\r
+            drp_crop.SelectedIndex = 0;     // Set the default Cropping Option\r
+            loadPresetPanel();              // Load the Preset Panel\r
+            // Load the user's default settings or Normal Preset\r
             if (Properties.Settings.Default.defaultSettings == "Checked")\r
                 loadUserDefaults();\r
             else\r
                 loadNormalPreset();\r
-            Thread.Sleep(100);\r
-\r
-            // Enable or disable tooltips\r
+            // Enabled GUI tooltip's if Required\r
             if (Properties.Settings.Default.tooltipEnable == "Checked")\r
-            {\r
-                lblStatus.Text = "Loading Tooltips ...";\r
-                Application.DoEvents();\r
                 ToolTip.Active = true;\r
-                Thread.Sleep(100);\r
-            }\r
+            Thread.Sleep(400);\r
+\r
 \r
             //Finished Loading\r
             lblStatus.Text = "Loading Complete!";\r
@@ -118,9 +117,8 @@ namespace Handbrake
             // Turn the interface back to the user\r
             this.Enabled = true;\r
 \r
-            // Some event Handlers.\r
+            // Some event Handlers. Used for minimize to taskbar\r
             this.Resize += new EventHandler(frmMain_Resize);\r
-\r
         }\r
 \r
         // Startup Functions\r
@@ -346,6 +344,11 @@ namespace Handbrake
             queueWindow.setQueue(encodeQueue);\r
             queueWindow.Show();\r
         }\r
+        private void mnu_encodeLog_Click(object sender, EventArgs e)\r
+        {\r
+            frmActivityWindow dvdInfoWindow = new frmActivityWindow("hb_encode_log.dat", this, queueWindow);\r
+            dvdInfoWindow.Show();\r
+        }\r
         private void mnu_viewDVDdata_Click(object sender, EventArgs e)\r
         {\r
             frmActivityWindow dvdInfoWindow = new frmActivityWindow("dvdinfo.dat", this, queueWindow);\r
@@ -363,7 +366,7 @@ namespace Handbrake
 \r
         private void mnu_presetReset_Click(object sender, EventArgs e)\r
         {\r
-            cliObj.grabCLIPresets();\r
+            hb_common_func.grabCLIPresets();\r
             loadPresetPanel();\r
             if (treeView_presets.Nodes.Count == 0)\r
                 MessageBox.Show("Unable to load the presets.dat file. Please select \"Update Built-in Presets\" from the Presets Menu \nMake sure you are running the program in Admin mode if running on Vista. See Windows FAQ for details!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
@@ -709,9 +712,37 @@ namespace Handbrake
         {\r
             setAudioByContainer(text_destination.Text);\r
             setVideoByContainer(text_destination.Text);\r
+            string path = text_destination.Text;\r
+            if (path.EndsWith(".mp4"))\r
+                drop_format.SelectedIndex = 0;\r
+            else if (path.EndsWith(".m4v"))\r
+                drop_format.SelectedIndex = 1;\r
+            else if (path.EndsWith(".mkv"))\r
+                drop_format.SelectedIndex = 2;\r
+            else if (path.EndsWith(".avi"))\r
+                drop_format.SelectedIndex = 3;\r
+            else if (path.EndsWith(".ogm"))\r
+                drop_format.SelectedIndex = 4;\r
+\r
         }\r
 \r
         // Output Settings\r
+        private void drop_format_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            \r
+            if (drop_format.SelectedIndex == 0)\r
+                setExtension(".mp4");\r
+            else if (drop_format.SelectedIndex == 1)\r
+                setExtension(".m4v");\r
+            else if (drop_format.SelectedIndex == 2)\r
+                setExtension(".mkv");\r
+            else if (drop_format.SelectedIndex == 3)\r
+                setExtension(".avi");\r
+            else if (drop_format.SelectedIndex == 4)\r
+                setExtension(".ogm");\r
+        }\r
+\r
+        //Video Tab\r
         private void drp_videoEncoder_SelectedIndexChanged(object sender, EventArgs e)\r
         {\r
             if ((text_destination.Text.Contains(".mp4")) || (text_destination.Text.Contains(".m4v")))\r
@@ -758,8 +789,6 @@ namespace Handbrake
             }\r
 \r
         }\r
-\r
-        //Video Tab\r
         private void text_bitrate_TextChanged(object sender, EventArgs e)\r
         {\r
             text_filesize.Text = "";\r
@@ -1457,11 +1486,6 @@ namespace Handbrake
         {\r
             rtf_query.Clear();\r
         }\r
-        private void btn_copy2C_Click(object sender, EventArgs e)\r
-        {\r
-            if (rtf_query.Text != "")\r
-                Clipboard.SetText(rtf_query.Text, TextDataFormat.Text);\r
-        }\r
 \r
         // Presets\r
         private void btn_addPreset_Click(object sender, EventArgs e)\r
@@ -1507,6 +1531,16 @@ namespace Handbrake
         #endregion\r
 \r
         #region Functions\r
+        // Replace File extenstion.\r
+        public void setExtension(string newExtension)\r
+        {\r
+            text_destination.Text = text_destination.Text.Replace(".mp4", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".m4v", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".mkv", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".avi", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".ogm", newExtension);\r
+        }\r
+\r
         // DVD Parsing\r
         public void setStreamReader(Parsing.DVD dvd)\r
         {\r
@@ -1917,6 +1951,7 @@ namespace Handbrake
                 MessageBox.Show("Drive Detection Error. \n Error Information: \n\n " + exc.ToString());\r
             }\r
         }\r
+\r
         #endregion\r
 \r
         #region Encoding and Queue\r
@@ -1933,7 +1968,9 @@ namespace Handbrake
             else\r
             {\r
                 hbProc = cliObj.runCli(this, (string)state);\r
+\r
                 hbProc.WaitForExit();\r
+                //MessageBox.Show(hbProc.ExitCode.ToString());\r
 \r
                 setEncodeLabelFinished();\r
                 hbProc = null;\r
@@ -2006,7 +2043,9 @@ namespace Handbrake
         }\r
 \r
         #endregion\r
-        \r
+\r
+\r
+\r
         // This is the END of the road ------------------------------------------------------------------------------\r
     }\r
 }
\ No newline at end of file
index bf77a09..1da887c 100644 (file)
@@ -188,6 +188,23 @@ Note: Do not change any of the chapter numbers!</value>
   <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>731, 18</value>\r
   </metadata>\r
+  <data name="btn_dvd_source.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAlpJREFUOE+tk21I\r
+        k1EYhif0oyA0sqIQCix/+GcQFFH9CCmiUBTLLEjShJofVBgL2fxoU9Pp5ubUlS5rU9f8rCyjsA+pUCRC\r
+        TR1ppmVFUSlmhq78unrnQF1KGHTg/nEOz30993PO+7qJFrmUeiv2n+Mij+XLRLLYULdF2pxlEVIDcw0p\r
+        AsyxD5fmI/rQ94pqi26eOlsfuZj+7BgSm01QdA4ih7m73Yx9qGpavwatjPebqCzOprPt8YKQgzFagqL0\r
+        BEjyEFWVaBkdLHMxT34uYNwWR9nVTEoL0zHlp2DMSeaSRk6eKt4VWm5WM/rVPNN5SjDTLQebZEHNA1wr\r
+        UvHjk3E6tsNcV62e1r3KLGqtKm6WplNpSsVqVFJsOM8VfSKFWjkGtcyZptSYzvC7XByx3zQoqCnTMvlG\r
+        CX1prnornPUmQJcUXsbSVhGK5bIOkcmQyveeTHiv4VZ5Nk33Nc6iuSO8CIfmECYa/bE/8ON1iRipJNh5\r
+        F0V6Bd86lfQ1JlFj1TDVq4COKCegLVIwHmGiKRB7/V6G7+5koHozymgfYRy5E1CgTWKgXcZ1i5qWp0KS\r
+        rjgBcAJawph6FszYk/2M1O1isGYLX8p9ab6wgqP+3rMvYciS01GfzA1LFvQkQ6sQ9/khxhoCGHnox1Dt\r
+        NvorxXw0b8Km8UQh2cip6GOzgNyMeKqKM7HdjqFZJ5pRk2YJ9aql3EnxoCJxNaZ4Ly6e3UDY3O6OEXRp\r
+        59ApTpIhiyDh9GHORAZyPHQPB/ZtZ/cOMVvFPvh6e7F+3SrWrHRnraf7Xz/xf/rJ/kvxb84I3U1y+9/W\r
+        AAAAAElFTkSuQmCC\r
+</value>\r
+  </data>\r
   <data name="btn_minimize.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
     <value>\r
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
index 1a50f1c..d239203 100644 (file)
@@ -22,7 +22,7 @@ namespace Handbrake
     {\r
         private delegate void ProgressUpdateHandler();\r
         private delegate void setEncoding();\r
-        Functions.CLI cliObj = new Functions.CLI();\r
+        Functions.Encode cliObj = new Functions.Encode();\r
         Boolean cancel = false;\r
         Process hbProc = null;\r
         Functions.Queue queue;\r
index d845efc..3eb212d 100644 (file)
@@ -34,7 +34,6 @@ namespace Handbrake
             this.inputFile = inputFile;\r
             this.mainWindow = parent;\r
             startScan();\r
-\r
         }\r
 \r
         private void startScan()\r
@@ -82,7 +81,7 @@ namespace Handbrake
             }\r
         }\r
 \r
-        Functions.CLI process = new Functions.CLI();\r
+        Functions.Encode process = new Functions.Encode();\r
 \r
         private void startProc(object state)\r
         {\r
@@ -91,7 +90,7 @@ namespace Handbrake
                 string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");\r
                 string dvdInfoPath = Path.Combine(Path.GetTempPath(), "dvdinfo.dat");\r
 \r
-                // Make we don't pick up a stale dvdinfo.dat (and that we have rights to the file)\r
+                // Make we don't pick up a stale hb_encode_log.dat (and that we have rights to the file)\r
                 if (File.Exists(dvdInfoPath))\r
                     File.Delete(dvdInfoPath);\r
 \r