OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 2 Feb 2008 15:34:27 +0000 (15:34 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 2 Feb 2008 15:34:27 +0000 (15:34 +0000)
- now using C#.Net 08
- Fixed bug with VFR setting framerate when enabled.
- Fixed potential framerate bug (passing framerate without -r to the CLI)

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

win/C#/Functions/Common.cs
win/C#/HandBrakeCS.csproj
win/C#/HandBrakeCS.sln
win/C#/Program.cs
win/C#/Properties/Settings.Designer.cs
win/C#/frmMain.Designer.cs
win/C#/frmMain.cs

index b4b2070..ec6ebee 100644 (file)
@@ -498,6 +498,7 @@ namespace Handbrake.Functions
             string vidQSetting = "";\r
             string twoPassEncoding = "";\r
             string videoFramerate = mainWindow.drp_videoFramerate.Text;\r
+            string vid_frame_rate = "";\r
             string turboH264 = "";\r
             string largeFile = "";\r
             string denoise = "";\r
@@ -528,9 +529,12 @@ namespace Handbrake.Functions
                 twoPassEncoding = " -2 ";\r
 \r
             if (videoFramerate == "Automatic")\r
-                videoFramerate = "";\r
+                vid_frame_rate = "";\r
             else\r
-                videoFramerate = " -r " + videoFramerate;\r
+            {\r
+                if (!mainWindow.check_vfr.Checked)\r
+                    vid_frame_rate = " -r " + videoFramerate;\r
+            }\r
 \r
             if (mainWindow.check_turbo.Checked)\r
                 turboH264 = " -T ";\r
@@ -565,7 +569,7 @@ namespace Handbrake.Functions
                 optimizeMP4 = " -O ";\r
 \r
 \r
-            string queryVideoSettings = videoBitrate + videoFilesize + vidQSetting + twoPassEncoding + videoFramerate + turboH264 + ipodAtom + optimizeMP4 + largeFile + denoise;\r
+            string queryVideoSettings = videoBitrate + videoFilesize + vidQSetting + twoPassEncoding + vid_frame_rate + turboH264 + ipodAtom + optimizeMP4 + largeFile + denoise;\r
             #endregion\r
 \r
             // Audio Settings Tab\r
@@ -699,7 +703,7 @@ namespace Handbrake.Functions
                 {\r
                     string path = Path.Combine(Path.GetTempPath(), "chapters.csv");\r
 \r
-                    ChapterMarkers = " --markers=" + path;\r
+                    ChapterMarkers = " --markers=" + "\"" + path + "\"";\r
                 }\r
             }\r
 \r
index 1e545d0..61db8ab 100644 (file)
@@ -1,8 +1,8 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
-    <ProductVersion>8.0.50727</ProductVersion>\r
+    <ProductVersion>9.0.21022</ProductVersion>\r
     <SchemaVersion>2.0</SchemaVersion>\r
     <ProjectGuid>{A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}</ProjectGuid>\r
     <OutputType>WinExe</OutputType>\r
     <StartupObject>Handbrake.Program</StartupObject>\r
     <TargetZone>LocalIntranet</TargetZone>\r
     <GenerateManifests>false</GenerateManifests>\r
+    <FileUpgradeFlags>\r
+    </FileUpgradeFlags>\r
+    <UpgradeBackupLocation>\r
+    </UpgradeBackupLocation>\r
+    <OldToolsVersion>2.0</OldToolsVersion>\r
+    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>\r
+    <PublishUrl>publish\</PublishUrl>\r
+    <Install>true</Install>\r
+    <InstallFrom>Disk</InstallFrom>\r
+    <UpdateEnabled>false</UpdateEnabled>\r
+    <UpdateMode>Foreground</UpdateMode>\r
+    <UpdateInterval>7</UpdateInterval>\r
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>\r
+    <UpdatePeriodically>false</UpdatePeriodically>\r
+    <UpdateRequired>false</UpdateRequired>\r
+    <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
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <PlatformTarget>x86</PlatformTarget>\r
   </PropertyGroup>\r
   <ItemGroup>\r
+    <Reference Include="PresentationCore">\r
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="PresentationFramework">\r
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>\r
+    </Reference>\r
     <Reference Include="System" />\r
     <Reference Include="System.Data" />\r
     <Reference Include="System.Deployment" />\r
     <Reference Include="System.Messaging" />\r
     <Reference Include="System.Windows.Forms" />\r
     <Reference Include="System.Xml" />\r
+    <Reference Include="UIAutomationProvider">\r
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="WindowsBase">\r
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="WindowsFormsIntegration">\r
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>\r
+    </Reference>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Compile Include="frmActivityWindow.cs">\r
       <Isolated>False</Isolated>\r
     </COMReference>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">\r
+      <Visible>False</Visible>\r
+      <ProductName>.NET Framework 2.0 %28x86%29</ProductName>\r
+      <Install>false</Install>\r
+    </BootstrapperPackage>\r
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">\r
+      <Visible>False</Visible>\r
+      <ProductName>.NET Framework 3.0 %28x86%29</ProductName>\r
+      <Install>false</Install>\r
+    </BootstrapperPackage>\r
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">\r
+      <Visible>False</Visible>\r
+      <ProductName>.NET Framework 3.5</ProductName>\r
+      <Install>true</Install>\r
+    </BootstrapperPackage>\r
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">\r
+      <Visible>False</Visible>\r
+      <ProductName>Windows Installer 3.1</ProductName>\r
+      <Install>true</Install>\r
+    </BootstrapperPackage>\r
+  </ItemGroup>\r
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />\r
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
        Other similar extension points exist, see Microsoft.Common.targets.\r
index eaa729e..be0c50c 100644 (file)
@@ -1,6 +1,6 @@
 \r
-Microsoft Visual Studio Solution File, Format Version 9.00\r
-# Visual Studio 2005\r
+Microsoft Visual Studio Solution File, Format Version 10.00\r
+# Visual C# Express 2008\r
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrakeCS", "HandBrakeCS.csproj", "{A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}"\r
 EndProject\r
 Global\r
index a613eca..5f3b946 100644 (file)
@@ -32,7 +32,7 @@ namespace Handbrake
         {\r
             // Development Code Expiry.\r
             // Remember to comment out on public release!!!\r
-            if (DateTime.Now > DateTime.Parse("2008/02/27", new CultureInfo("en-US"))) { MessageBox.Show("Sorry, This development build of Handbrake has expired."); return; } \r
+            if (DateTime.Now > DateTime.Parse("2008/02/25", new CultureInfo("en-US"))) { MessageBox.Show("Sorry, This development build of Handbrake has expired."); return; } \r
 \r
             // Check the system meets the system requirements.\r
             Boolean launch = true;\r
index 607a238..8dd4dc4 100644 (file)
@@ -12,7 +12,7 @@ namespace Handbrake.Properties {
     \r
     \r
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]\r
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]\r
     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\r
         \r
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\r
index d657c40..09faabe 100644 (file)
@@ -37,7 +37,7 @@ namespace Handbrake
             this.components = new System.ComponentModel.Container();\r
             System.Windows.Forms.Label Label38;\r
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));\r
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();\r
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();\r
             this.DVD_Save = new System.Windows.Forms.SaveFileDialog();\r
             this.File_Save = new System.Windows.Forms.SaveFileDialog();\r
             this.ToolTip = new System.Windows.Forms.ToolTip(this.components);\r
@@ -131,7 +131,7 @@ namespace Handbrake
             this.TabPage3 = new System.Windows.Forms.TabPage();\r
             this.label25 = new System.Windows.Forms.Label();\r
             this.lbl_vfr = new System.Windows.Forms.Label();\r
-            this.lbl_largeMp4Warning = new System.Windows.Forms.Label();\r
+            this.check_grayscale = new System.Windows.Forms.CheckBox();\r
             this.Label22 = new System.Windows.Forms.Label();\r
             this.check_2PassEncode = new System.Windows.Forms.CheckBox();\r
             this.Label2 = new System.Windows.Forms.Label();\r
@@ -140,7 +140,6 @@ namespace Handbrake
             this.Label46 = new System.Windows.Forms.Label();\r
             this.Label40 = new System.Windows.Forms.Label();\r
             this.check_iPodAtom = new System.Windows.Forms.CheckBox();\r
-            this.check_grayscale = new System.Windows.Forms.CheckBox();\r
             this.TabPage1 = new System.Windows.Forms.TabPage();\r
             this.text_bottom = new System.Windows.Forms.NumericUpDown();\r
             this.text_top = new System.Windows.Forms.NumericUpDown();\r
@@ -259,8 +258,7 @@ namespace Handbrake
             this.drop_chapterFinish.Size = new System.Drawing.Size(69, 21);\r
             this.drop_chapterFinish.TabIndex = 10;\r
             this.drop_chapterFinish.Text = "Auto";\r
-            this.ToolTip.SetToolTip(this.drop_chapterFinish, "Step 3 - Select the chapter range you would like to enocde. (default: All Chapter" +\r
-                    "s)");\r
+            this.ToolTip.SetToolTip(this.drop_chapterFinish, "Select the chapter range you would like to enocde. (default: All Chapters)");\r
             this.drop_chapterFinish.SelectedIndexChanged += new System.EventHandler(this.drop_chapterFinish_SelectedIndexChanged);\r
             // \r
             // drop_chapterStart\r
@@ -273,8 +271,7 @@ namespace Handbrake
             this.drop_chapterStart.Size = new System.Drawing.Size(69, 21);\r
             this.drop_chapterStart.TabIndex = 9;\r
             this.drop_chapterStart.Text = "Auto";\r
-            this.ToolTip.SetToolTip(this.drop_chapterStart, "Step 3 - Select the chapter range you would like to enocde. (default: All Chapter" +\r
-                    "s)");\r
+            this.ToolTip.SetToolTip(this.drop_chapterStart, "Select the chapter range you would like to enocde. (default: All Chapters)");\r
             this.drop_chapterStart.SelectedIndexChanged += new System.EventHandler(this.drop_chapterStart_SelectedIndexChanged);\r
             // \r
             // drp_dvdtitle\r
@@ -289,7 +286,7 @@ namespace Handbrake
             this.drp_dvdtitle.Size = new System.Drawing.Size(119, 21);\r
             this.drp_dvdtitle.TabIndex = 7;\r
             this.drp_dvdtitle.Text = "Automatic";\r
-            this.ToolTip.SetToolTip(this.drp_dvdtitle, "Step 2 - Select the title number you wish to encode.");\r
+            this.ToolTip.SetToolTip(this.drp_dvdtitle, "Select the title you wish to encode.");\r
             this.drp_dvdtitle.SelectedIndexChanged += new System.EventHandler(this.drp_dvdtitle_SelectedIndexChanged);\r
             this.drp_dvdtitle.Click += new System.EventHandler(this.drp_dvdtitle_Click);\r
             // \r
@@ -302,7 +299,7 @@ namespace Handbrake
             this.RadioISO.Size = new System.Drawing.Size(44, 17);\r
             this.RadioISO.TabIndex = 4;\r
             this.RadioISO.Text = "File";\r
-            this.ToolTip.SetToolTip(this.RadioISO, "ISO, TS, MPG");\r
+            this.ToolTip.SetToolTip(this.RadioISO, "For selecting: ISO, TS, MPG");\r
             this.RadioISO.UseVisualStyleBackColor = true;\r
             // \r
             // text_source\r
@@ -354,7 +351,7 @@ namespace Handbrake
             this.btn_destBrowse.Size = new System.Drawing.Size(83, 22);\r
             this.btn_destBrowse.TabIndex = 2;\r
             this.btn_destBrowse.Text = "Browse";\r
-            this.ToolTip.SetToolTip(this.btn_destBrowse, "Step 4 - Select a location to save your encoded file.");\r
+            this.ToolTip.SetToolTip(this.btn_destBrowse, " Select a location to save your encoded file.");\r
             this.btn_destBrowse.UseVisualStyleBackColor = false;\r
             this.btn_destBrowse.Click += new System.EventHandler(this.btn_destBrowse_Click);\r
             // \r
@@ -372,7 +369,7 @@ namespace Handbrake
             this.drp_videoEncoder.Name = "drp_videoEncoder";\r
             this.drp_videoEncoder.Size = new System.Drawing.Size(156, 21);\r
             this.drp_videoEncoder.TabIndex = 1;\r
-            this.ToolTip.SetToolTip(this.drp_videoEncoder, "Step 5 - Select a video encoder");\r
+            this.ToolTip.SetToolTip(this.drp_videoEncoder, "Select a video encoder");\r
             this.drp_videoEncoder.SelectedIndexChanged += new System.EventHandler(this.drp_videoEncoder_SelectedIndexChanged);\r
             // \r
             // drp_audioCodec\r
@@ -390,7 +387,7 @@ namespace Handbrake
             this.drp_audioCodec.Name = "drp_audioCodec";\r
             this.drp_audioCodec.Size = new System.Drawing.Size(111, 21);\r
             this.drp_audioCodec.TabIndex = 3;\r
-            this.ToolTip.SetToolTip(this.drp_audioCodec, "Step 6 - Select an audio encoder.");\r
+            this.ToolTip.SetToolTip(this.drp_audioCodec, "Select an audio encoder.");\r
             this.drp_audioCodec.SelectedIndexChanged += new System.EventHandler(this.drp_audioCodec_SelectedIndexChanged);\r
             // \r
             // drp_audioBitrate\r
@@ -441,10 +438,11 @@ namespace Handbrake
             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(16, 80);\r
             this.check_largeFile.Name = "check_largeFile";\r
-            this.check_largeFile.Size = new System.Drawing.Size(170, 17);\r
+            this.check_largeFile.Size = new System.Drawing.Size(82, 17);\r
             this.check_largeFile.TabIndex = 4;\r
-            this.check_largeFile.Text = "Larger MP4 Files (> 4GB)";\r
-            this.ToolTip.SetToolTip(this.check_largeFile, "Allows creation of MP4 files greater than 4GB.");\r
+            this.check_largeFile.Text = "64Bit MP4";\r
+            this.ToolTip.SetToolTip(this.check_largeFile, "Allows creation of MP4 files greater than 4GB.\r\nWarning: Breaks iPod, Apple TV an" +\r
+                    "d PS3 compatibility.");\r
             this.check_largeFile.UseVisualStyleBackColor = false;\r
             this.check_largeFile.CheckedChanged += new System.EventHandler(this.check_largeFile_CheckedChanged);\r
             // \r
@@ -905,6 +903,7 @@ namespace Handbrake
             this.RadioDVD.TabIndex = 3;\r
             this.RadioDVD.TabStop = true;\r
             this.RadioDVD.Text = "Folder";\r
+            this.ToolTip.SetToolTip(this.RadioDVD, "For Selecting a \"Video_TS\" folder on your hard drive or DVD");\r
             this.RadioDVD.UseVisualStyleBackColor = true;\r
             // \r
             // Label17\r
@@ -1256,7 +1255,6 @@ namespace Handbrake
             this.TabPage3.BackColor = System.Drawing.SystemColors.ControlLight;\r
             this.TabPage3.Controls.Add(this.label25);\r
             this.TabPage3.Controls.Add(this.lbl_vfr);\r
-            this.TabPage3.Controls.Add(this.lbl_largeMp4Warning);\r
             this.TabPage3.Controls.Add(this.check_largeFile);\r
             this.TabPage3.Controls.Add(this.check_grayscale);\r
             this.TabPage3.Controls.Add(this.check_turbo);\r
@@ -1302,16 +1300,17 @@ namespace Handbrake
             this.lbl_vfr.Text = "(VFR On)";\r
             this.lbl_vfr.Visible = false;\r
             // \r
-            // lbl_largeMp4Warning\r
+            // check_grayscale\r
             // \r
-            this.lbl_largeMp4Warning.AutoSize = true;\r
-            this.lbl_largeMp4Warning.BackColor = System.Drawing.Color.Transparent;\r
-            this.lbl_largeMp4Warning.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.lbl_largeMp4Warning.Location = new System.Drawing.Point(35, 100);\r
-            this.lbl_largeMp4Warning.Name = "lbl_largeMp4Warning";\r
-            this.lbl_largeMp4Warning.Size = new System.Drawing.Size(241, 12);\r
-            this.lbl_largeMp4Warning.TabIndex = 5;\r
-            this.lbl_largeMp4Warning.Text = "Warning: Breaks iPod, @TV, PS3 compatibility.";\r
+            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, 103);\r
+            this.check_grayscale.Name = "check_grayscale";\r
+            this.check_grayscale.Size = new System.Drawing.Size(138, 17);\r
+            this.check_grayscale.TabIndex = 1;\r
+            this.check_grayscale.Text = "Grayscale Encoding";\r
+            this.check_grayscale.UseVisualStyleBackColor = false;\r
             // \r
             // Label22\r
             // \r
@@ -1405,18 +1404,6 @@ namespace Handbrake
             this.check_iPodAtom.UseVisualStyleBackColor = false;\r
             this.check_iPodAtom.CheckedChanged += new System.EventHandler(this.check_iPodAtom_CheckedChanged);\r
             // \r
-            // check_grayscale\r
-            // \r
-            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, 117);\r
-            this.check_grayscale.Name = "check_grayscale";\r
-            this.check_grayscale.Size = new System.Drawing.Size(138, 17);\r
-            this.check_grayscale.TabIndex = 1;\r
-            this.check_grayscale.Text = "Grayscale Encoding";\r
-            this.check_grayscale.UseVisualStyleBackColor = false;\r
-            // \r
             // TabPage1\r
             // \r
             this.TabPage1.BackColor = System.Drawing.SystemColors.ControlLight;\r
@@ -1866,9 +1853,9 @@ namespace Handbrake
             // \r
             // number\r
             // \r
-            dataGridViewCellStyle3.Format = "N0";\r
-            dataGridViewCellStyle3.NullValue = null;\r
-            this.number.DefaultCellStyle = dataGridViewCellStyle3;\r
+            dataGridViewCellStyle2.Format = "N0";\r
+            dataGridViewCellStyle2.NullValue = null;\r
+            this.number.DefaultCellStyle = dataGridViewCellStyle2;\r
             this.number.HeaderText = "Chapter Number";\r
             this.number.MaxInputLength = 3;\r
             this.number.Name = "number";\r
@@ -2285,7 +2272,6 @@ namespace Handbrake
         internal System.Windows.Forms.Label Label18;\r
         internal System.Windows.Forms.ComboBox drp_audioSampleRate;\r
         internal System.Windows.Forms.TabPage TabPage3;\r
-        internal System.Windows.Forms.Label lbl_largeMp4Warning;\r
         internal System.Windows.Forms.CheckBox check_largeFile;\r
         internal System.Windows.Forms.CheckBox check_turbo;\r
         internal System.Windows.Forms.Label Label22;\r
index bd76019..0d9e6f4 100644 (file)
@@ -733,16 +733,14 @@ namespace Handbrake
 \r
         private void check_largeFile_CheckedChanged(object sender, EventArgs e)\r
         {\r
-            if (!text_destination.Text.Contains(".mp4"))\r
+            if ((!text_destination.Text.Contains(".mp4")) && (!text_destination.Text.Contains(".m4v")))\r
             {\r
-                lbl_largeMp4Warning.Text = "Warning: Only mp4 files are supported";\r
-                lbl_largeMp4Warning.ForeColor = Color.Red;\r
+                check_largeFile.BackColor = Color.LightCoral;\r
                 check_largeFile.CheckState = CheckState.Unchecked;\r
             }\r
             else\r
             {\r
-                lbl_largeMp4Warning.Text = "Warning: Breaks iPod, @TV, PS3 compatibility.";\r
-                lbl_largeMp4Warning.ForeColor = Color.Black;\r
+                check_largeFile.BackColor = Color.Transparent;\r
             }\r
         }\r
 \r