OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 14 Sep 2008 20:50:55 +0000 (20:50 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 14 Sep 2008 20:50:55 +0000 (20:50 +0000)
- Fix: Cropping setting incorrectly set if --crop 0:0:0:0 is used in a preset.

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

win/C#/Functions/Common.cs
win/C#/Functions/QueryParser.cs
win/C#/frmAddPreset.Designer.cs
win/C#/frmAddPreset.cs
win/C#/frmMain.Designer.cs
win/C#/frmMain.resx

index 7b3e36f..8ef4b3b 100644 (file)
@@ -110,7 +110,13 @@ namespace Handbrake.Functions
             #region Picture\r
 \r
             if (presetQuery.CropTop == "0" && presetQuery.CropBottom == "0" && presetQuery.CropLeft == "0" && presetQuery.CropRight == "0")\r
-                mainWindow.check_autoCrop.Checked = true;\r
+            {\r
+                mainWindow.check_customCrop.Checked = true;\r
+                mainWindow.text_top.Text = "0";\r
+                mainWindow.text_bottom.Text = "0";\r
+                mainWindow.text_left.Text = "0";\r
+                mainWindow.text_right.Text = "0";\r
+            }\r
             else if (presetQuery.CropTop != null && presetQuery.CropBottom != null && presetQuery.CropLeft != null && presetQuery.CropRight != null)\r
             {\r
                 mainWindow.check_customCrop.Checked = true;\r
index 347e3f9..0130286 100644 (file)
@@ -818,7 +818,7 @@ namespace Handbrake.Functions
             Match detelecine = Regex.Match(input, @"--detelecine");\r
             Match anamorphic = Regex.Match(input, @" -p ");\r
             Match chapterMarkers = Regex.Match(input, @" -m");\r
-            Match crop = Regex.Match(input, @"--crop ([0-9]):([0-9]):([0-9]):([0-9])");\r
+            Match crop = Regex.Match(input, @"--crop ([0-9]*):([0-9]*):([0-9]*):([0-9]*)");\r
             Match vfr = Regex.Match(input, @" -V");\r
             Match lanamorphic = Regex.Match(input, @" -P");\r
             Match decomb = Regex.Match(input, @" --decomb");\r
index b91ece1..00f33ba 100644 (file)
@@ -61,24 +61,24 @@ namespace Handbrake
             // \r
             // btn_add\r
             // \r
-            this.btn_add.BackColor = System.Drawing.Color.Transparent;\r
+            this.btn_add.BackColor = System.Drawing.SystemColors.Control;\r
             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(233, 44);\r
+            this.btn_add.Location = new System.Drawing.Point(284, 42);\r
             this.btn_add.Name = "btn_add";\r
-            this.btn_add.Size = new System.Drawing.Size(117, 22);\r
-            this.btn_add.TabIndex = 4;\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.Text = "Add Preset";\r
-            this.btn_add.UseVisualStyleBackColor = true;\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
             // \r
             // frmAddPreset\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
-            this.ClientSize = new System.Drawing.Size(366, 76);\r
+            this.ClientSize = new System.Drawing.Size(362, 76);\r
             this.Controls.Add(this.btn_add);\r
             this.Controls.Add(this.txt_preset_name);\r
             this.Controls.Add(this.lbl_name);\r
index 898b067..1a18c0a 100644 (file)
@@ -17,6 +17,7 @@ namespace Handbrake
 {\r
     public partial class frmAddPreset : Form\r
     {\r
+        Functions.Common hb_common_func = new Functions.Common();\r
         private frmMain frmMainWindow;\r
         Functions.Presets presetCode;\r
 \r
@@ -29,7 +30,6 @@ namespace Handbrake
 \r
         private void btn_add_Click(object sender, EventArgs e)\r
         {\r
-            Functions.Common hb_common_func = new Functions.Common();\r
             String query = hb_common_func.GenerateTheQuery(frmMainWindow);\r
 \r
             if (presetCode.addPreset(txt_preset_name.Text.Trim(), query) == true)\r
@@ -38,5 +38,6 @@ namespace Handbrake
                 this.Close();\r
             }\r
         }\r
+\r
     }\r
 }
\ No newline at end of file
index 1fef2e7..eb197e7 100644 (file)
@@ -38,7 +38,7 @@ namespace Handbrake
             System.Windows.Forms.Label Label38;\r
             System.Windows.Forms.ContextMenuStrip notifyIconMenu;\r
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));\r
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();\r
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();\r
             this.btn_restore = new System.Windows.Forms.ToolStripMenuItem();\r
             this.DVD_Save = new System.Windows.Forms.SaveFileDialog();\r
             this.File_Save = new System.Windows.Forms.SaveFileDialog();\r
@@ -582,7 +582,7 @@ namespace Handbrake
             // \r
             this.text_height.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.text_height.ForeColor = System.Drawing.SystemColors.InfoText;\r
-            this.text_height.Location = new System.Drawing.Point(498, 78);\r
+            this.text_height.Location = new System.Drawing.Point(498, 81);\r
             this.text_height.Name = "text_height";\r
             this.text_height.Size = new System.Drawing.Size(64, 21);\r
             this.text_height.TabIndex = 19;\r
@@ -646,9 +646,9 @@ namespace Handbrake
             // \r
             // number\r
             // \r
-            dataGridViewCellStyle2.Format = "N0";\r
-            dataGridViewCellStyle2.NullValue = null;\r
-            this.number.DefaultCellStyle = dataGridViewCellStyle2;\r
+            dataGridViewCellStyle1.Format = "N0";\r
+            dataGridViewCellStyle1.NullValue = null;\r
+            this.number.DefaultCellStyle = dataGridViewCellStyle1;\r
             this.number.HeaderText = "Chapter Number";\r
             this.number.MaxInputLength = 3;\r
             this.number.Name = "number";\r
@@ -1224,7 +1224,7 @@ namespace Handbrake
             this.HelpToolStripMenuItem});\r
             this.frmMainMenu.Location = new System.Drawing.Point(0, 0);\r
             this.frmMainMenu.Name = "frmMainMenu";\r
-            this.frmMainMenu.Size = new System.Drawing.Size(938, 24);\r
+            this.frmMainMenu.Size = new System.Drawing.Size(958, 24);\r
             this.frmMainMenu.TabIndex = 0;\r
             this.frmMainMenu.Text = "MenuStrip1";\r
             // \r
@@ -2997,7 +2997,7 @@ namespace Handbrake
             this.groupBox2.ForeColor = System.Drawing.Color.Black;\r
             this.groupBox2.Location = new System.Drawing.Point(728, 70);\r
             this.groupBox2.Name = "groupBox2";\r
-            this.groupBox2.Size = new System.Drawing.Size(198, 537);\r
+            this.groupBox2.Size = new System.Drawing.Size(218, 537);\r
             this.groupBox2.TabIndex = 6;\r
             this.groupBox2.TabStop = false;\r
             this.groupBox2.Text = "Presets";\r
@@ -3011,7 +3011,7 @@ namespace Handbrake
             this.treeView_presets.Location = new System.Drawing.Point(10, 23);\r
             this.treeView_presets.Name = "treeView_presets";\r
             this.treeView_presets.ShowLines = false;\r
-            this.treeView_presets.Size = new System.Drawing.Size(177, 473);\r
+            this.treeView_presets.Size = new System.Drawing.Size(198, 473);\r
             this.treeView_presets.TabIndex = 0;\r
             this.treeView_presets.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_presets_AfterSelect);\r
             this.treeView_presets.KeyUp += new System.Windows.Forms.KeyEventHandler(this.treeView_presets_deleteKey);\r
@@ -3032,7 +3032,7 @@ namespace Handbrake
             this.toolStrip1.Location = new System.Drawing.Point(0, 24);\r
             this.toolStrip1.Name = "toolStrip1";\r
             this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;\r
-            this.toolStrip1.Size = new System.Drawing.Size(938, 39);\r
+            this.toolStrip1.Size = new System.Drawing.Size(958, 39);\r
             this.toolStrip1.TabIndex = 1;\r
             this.toolStrip1.Text = "toolStrip1";\r
             // \r
@@ -3167,7 +3167,7 @@ namespace Handbrake
             this.lbl_encode});\r
             this.StatusStrip.Location = new System.Drawing.Point(0, 619);\r
             this.StatusStrip.Name = "StatusStrip";\r
-            this.StatusStrip.Size = new System.Drawing.Size(938, 22);\r
+            this.StatusStrip.Size = new System.Drawing.Size(958, 22);\r
             this.StatusStrip.TabIndex = 7;\r
             this.StatusStrip.Text = "statusStrip1";\r
             // \r
@@ -3182,7 +3182,7 @@ namespace Handbrake
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
-            this.ClientSize = new System.Drawing.Size(938, 641);\r
+            this.ClientSize = new System.Drawing.Size(958, 641);\r
             this.Controls.Add(this.GroupBox1);\r
             this.Controls.Add(this.groupBox_dest);\r
             this.Controls.Add(this.groupBox_output);\r
index d0c9f18..1b5323e 100644 (file)
@@ -155,12 +155,6 @@ Make sure you have selected a "Title" from the "Source" box above otherwise
 the list will not be populated with the correct amount of chapters.\r
 Note: Do not change any of the chapter numbers!</value>\r
   </data>\r
-  <metadata name="number.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
-    <value>True</value>\r
-  </metadata>\r
-  <metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
-    <value>True</value>\r
-  </metadata>\r
   <metadata name="DVD_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>223, 15</value>\r
   </metadata>\r