OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 4 Dec 2009 16:27:02 +0000 (16:27 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 4 Dec 2009 16:27:02 +0000 (16:27 +0000)
- Implement new option: "--previews" allowing a range of 10 to 30 to be selected on the preview window.

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

win/C#/Functions/QueryGenerator.cs
win/C#/Properties/Settings.Designer.cs
win/C#/Properties/Settings.settings
win/C#/app.config
win/C#/frmOptions.Designer.cs
win/C#/frmOptions.cs
win/C#/frmPreview.cs

index 7491036..ac4170a 100644 (file)
@@ -42,6 +42,7 @@ namespace Handbrake.Functions
 \r
             if (duration != 0 && preview != null) // Preivew Query\r
             {\r
+                query += " --previews " + Properties.Settings.Default.previewScanCount + " ";\r
                 query += " --start-at-preview " + preview;\r
                 query += " --stop-at duration:" + duration + " ";\r
 \r
index af174ab..f97bef8 100644 (file)
@@ -476,5 +476,17 @@ namespace Handbrake.Properties {
                 this["cliLastModified"] = value;\r
             }\r
         }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("10")]\r
+        public int previewScanCount {\r
+            get {\r
+                return ((int)(this["previewScanCount"]));\r
+            }\r
+            set {\r
+                this["previewScanCount"] = value;\r
+            }\r
+        }\r
     }\r
 }\r
index f1c0263..264ad81 100644 (file)
     <Setting Name="cliLastModified" Type="System.DateTime" Scope="User">\r
       <Value Profile="(Default)" />\r
     </Setting>\r
+    <Setting Name="previewScanCount" Type="System.Int32" Scope="User">\r
+      <Value Profile="(Default)">10</Value>\r
+    </Setting>\r
   </Settings>\r
 </SettingsFile>
\ No newline at end of file
index 6cd2d7e..4be8682 100644 (file)
             <setting name="cliLastModified" serializeAs="String">\r
                 <value />\r
             </setting>\r
+            <setting name="previewScanCount" serializeAs="String">\r
+                <value>10</value>\r
+            </setting>\r
         </Handbrake.Properties.Settings>\r
     </userSettings>\r
 <startup><supportedRuntime version="v2.0.50727"/></startup></configuration>\r
index 85c5e1d..503dc07 100644 (file)
@@ -86,7 +86,6 @@ namespace Handbrake
             this.btn_clearLogs = new System.Windows.Forms.Button();\r
             this.label14 = new System.Windows.Forms.Label();\r
             this.tab_advanced = new System.Windows.Forms.TabPage();\r
-            this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();\r
             this.check_promptOnUnmatchingQueries = new System.Windows.Forms.CheckBox();\r
             this.check_dvdnav = new System.Windows.Forms.CheckBox();\r
             this.check_trayStatusAlerts = new System.Windows.Forms.CheckBox();\r
@@ -135,6 +134,8 @@ namespace Handbrake
             this.label27 = new System.Windows.Forms.Label();\r
             this.openFile_vlc = new System.Windows.Forms.OpenFileDialog();\r
             this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel();\r
+            this.label33 = new System.Windows.Forms.Label();\r
+            this.drop_previewScanCount = new System.Windows.Forms.ComboBox();\r
             this.tab_options.SuspendLayout();\r
             this.tab_general.SuspendLayout();\r
             this.tab_picture.SuspendLayout();\r
@@ -143,7 +144,6 @@ namespace Handbrake
             this.tab_cli.SuspendLayout();\r
             this.tableLayoutPanel3.SuspendLayout();\r
             this.tab_advanced.SuspendLayout();\r
-            this.tableLayoutPanel4.SuspendLayout();\r
             this.tab_debug.SuspendLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();\r
             this.tableLayoutPanel5.SuspendLayout();\r
@@ -858,7 +858,20 @@ namespace Handbrake
             // \r
             // tab_advanced\r
             // \r
-            this.tab_advanced.Controls.Add(this.tableLayoutPanel4);\r
+            this.tab_advanced.Controls.Add(this.drop_previewScanCount);\r
+            this.tab_advanced.Controls.Add(this.label33);\r
+            this.tab_advanced.Controls.Add(this.label6);\r
+            this.tab_advanced.Controls.Add(this.check_trayStatusAlerts);\r
+            this.tab_advanced.Controls.Add(this.check_mainMinimize);\r
+            this.tab_advanced.Controls.Add(this.check_promptOnUnmatchingQueries);\r
+            this.tab_advanced.Controls.Add(this.check_dvdnav);\r
+            this.tab_advanced.Controls.Add(this.check_queryEditorTab);\r
+            this.tab_advanced.Controls.Add(this.label32);\r
+            this.tab_advanced.Controls.Add(this.drop_x264step);\r
+            this.tab_advanced.Controls.Add(this.label30);\r
+            this.tab_advanced.Controls.Add(this.check_disablePresetNotification);\r
+            this.tab_advanced.Controls.Add(this.label28);\r
+            this.tab_advanced.Controls.Add(this.check_inGuiStatus);\r
             this.tab_advanced.Location = new System.Drawing.Point(4, 22);\r
             this.tab_advanced.Name = "tab_advanced";\r
             this.tab_advanced.Padding = new System.Windows.Forms.Padding(10);\r
@@ -867,52 +880,10 @@ namespace Handbrake
             this.tab_advanced.Text = "Advanced / Other";\r
             this.tab_advanced.UseVisualStyleBackColor = true;\r
             // \r
-            // tableLayoutPanel4\r
-            // \r
-            this.tableLayoutPanel4.AutoSize = true;\r
-            this.tableLayoutPanel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\r
-            this.tableLayoutPanel4.ColumnCount = 6;\r
-            this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
-            this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));\r
-            this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));\r
-            this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
-            this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
-            this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
-            this.tableLayoutPanel4.Controls.Add(this.check_promptOnUnmatchingQueries, 3, 4);\r
-            this.tableLayoutPanel4.Controls.Add(this.check_dvdnav, 2, 10);\r
-            this.tableLayoutPanel4.Controls.Add(this.check_trayStatusAlerts, 3, 2);\r
-            this.tableLayoutPanel4.Controls.Add(this.label32, 0, 10);\r
-            this.tableLayoutPanel4.Controls.Add(this.label6, 0, 0);\r
-            this.tableLayoutPanel4.Controls.Add(this.drop_x264step, 4, 8);\r
-            this.tableLayoutPanel4.Controls.Add(this.label30, 2, 8);\r
-            this.tableLayoutPanel4.Controls.Add(this.check_mainMinimize, 2, 1);\r
-            this.tableLayoutPanel4.Controls.Add(this.label28, 0, 8);\r
-            this.tableLayoutPanel4.Controls.Add(this.check_queryEditorTab, 2, 3);\r
-            this.tableLayoutPanel4.Controls.Add(this.check_disablePresetNotification, 2, 5);\r
-            this.tableLayoutPanel4.Controls.Add(this.check_inGuiStatus, 2, 6);\r
-            this.tableLayoutPanel4.Location = new System.Drawing.Point(10, 10);\r
-            this.tableLayoutPanel4.Name = "tableLayoutPanel4";\r
-            this.tableLayoutPanel4.RowCount = 12;\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel4.Size = new System.Drawing.Size(395, 228);\r
-            this.tableLayoutPanel4.TabIndex = 62;\r
-            // \r
             // check_promptOnUnmatchingQueries\r
             // \r
             this.check_promptOnUnmatchingQueries.AutoSize = true;\r
-            this.tableLayoutPanel4.SetColumnSpan(this.check_promptOnUnmatchingQueries, 3);\r
-            this.check_promptOnUnmatchingQueries.Location = new System.Drawing.Point(87, 72);\r
+            this.check_promptOnUnmatchingQueries.Location = new System.Drawing.Point(100, 83);\r
             this.check_promptOnUnmatchingQueries.Name = "check_promptOnUnmatchingQueries";\r
             this.check_promptOnUnmatchingQueries.Size = new System.Drawing.Size(305, 17);\r
             this.check_promptOnUnmatchingQueries.TabIndex = 63;\r
@@ -925,8 +896,7 @@ namespace Handbrake
             this.check_dvdnav.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.check_dvdnav.AutoSize = true;\r
             this.check_dvdnav.BackColor = System.Drawing.Color.Transparent;\r
-            this.tableLayoutPanel4.SetColumnSpan(this.check_dvdnav, 4);\r
-            this.check_dvdnav.Location = new System.Drawing.Point(67, 208);\r
+            this.check_dvdnav.Location = new System.Drawing.Point(82, 227);\r
             this.check_dvdnav.Name = "check_dvdnav";\r
             this.check_dvdnav.Size = new System.Drawing.Size(276, 17);\r
             this.check_dvdnav.TabIndex = 90;\r
@@ -939,8 +909,7 @@ namespace Handbrake
             this.check_trayStatusAlerts.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.check_trayStatusAlerts.AutoSize = true;\r
             this.check_trayStatusAlerts.BackColor = System.Drawing.Color.Transparent;\r
-            this.tableLayoutPanel4.SetColumnSpan(this.check_trayStatusAlerts, 3);\r
-            this.check_trayStatusAlerts.Location = new System.Drawing.Point(87, 26);\r
+            this.check_trayStatusAlerts.Location = new System.Drawing.Point(81, 37);\r
             this.check_trayStatusAlerts.Name = "check_trayStatusAlerts";\r
             this.check_trayStatusAlerts.Size = new System.Drawing.Size(296, 17);\r
             this.check_trayStatusAlerts.TabIndex = 93;\r
@@ -956,7 +925,7 @@ namespace Handbrake
             this.label32.Anchor = System.Windows.Forms.AnchorStyles.Right;\r
             this.label32.AutoSize = true;\r
             this.label32.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label32.Location = new System.Drawing.Point(8, 210);\r
+            this.label32.Location = new System.Drawing.Point(13, 228);\r
             this.label32.Name = "label32";\r
             this.label32.Size = new System.Drawing.Size(33, 13);\r
             this.label32.TabIndex = 89;\r
@@ -967,17 +936,15 @@ namespace Handbrake
             this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\r
             this.label6.AutoSize = true;\r
             this.label6.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label6.Location = new System.Drawing.Point(10, 5);\r
+            this.label6.Location = new System.Drawing.Point(15, 15);\r
             this.label6.Margin = new System.Windows.Forms.Padding(3, 5, 3, 0);\r
             this.label6.Name = "label6";\r
-            this.tableLayoutPanel4.SetRowSpan(this.label6, 2);\r
             this.label6.Size = new System.Drawing.Size(31, 13);\r
             this.label6.TabIndex = 71;\r
             this.label6.Text = "GUI:";\r
             // \r
             // drop_x264step\r
             // \r
-            this.tableLayoutPanel4.SetColumnSpan(this.drop_x264step, 2);\r
             this.drop_x264step.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
             this.drop_x264step.FormattingEnabled = true;\r
             this.drop_x264step.Items.AddRange(new object[] {\r
@@ -985,7 +952,7 @@ namespace Handbrake
             "0.50",\r
             "0.25",\r
             "0.20"});\r
-            this.drop_x264step.Location = new System.Drawing.Point(262, 161);\r
+            this.drop_x264step.Location = new System.Drawing.Point(273, 190);\r
             this.drop_x264step.Name = "drop_x264step";\r
             this.drop_x264step.Size = new System.Drawing.Size(85, 21);\r
             this.drop_x264step.TabIndex = 86;\r
@@ -997,8 +964,7 @@ namespace Handbrake
             // \r
             this.label30.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.label30.AutoSize = true;\r
-            this.tableLayoutPanel4.SetColumnSpan(this.label30, 2);\r
-            this.label30.Location = new System.Drawing.Point(67, 165);\r
+            this.label30.Location = new System.Drawing.Point(78, 193);\r
             this.label30.Name = "label30";\r
             this.label30.Size = new System.Drawing.Size(189, 13);\r
             this.label30.TabIndex = 87;\r
@@ -1009,8 +975,7 @@ namespace Handbrake
             this.check_mainMinimize.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.check_mainMinimize.AutoSize = true;\r
             this.check_mainMinimize.BackColor = System.Drawing.Color.Transparent;\r
-            this.tableLayoutPanel4.SetColumnSpan(this.check_mainMinimize, 4);\r
-            this.check_mainMinimize.Location = new System.Drawing.Point(67, 3);\r
+            this.check_mainMinimize.Location = new System.Drawing.Point(81, 14);\r
             this.check_mainMinimize.Name = "check_mainMinimize";\r
             this.check_mainMinimize.Size = new System.Drawing.Size(138, 17);\r
             this.check_mainMinimize.TabIndex = 82;\r
@@ -1026,7 +991,7 @@ namespace Handbrake
             this.label28.Anchor = System.Windows.Forms.AnchorStyles.Right;\r
             this.label28.AutoSize = true;\r
             this.label28.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label28.Location = new System.Drawing.Point(3, 165);\r
+            this.label28.Location = new System.Drawing.Point(8, 193);\r
             this.label28.Name = "label28";\r
             this.label28.Size = new System.Drawing.Size(38, 13);\r
             this.label28.TabIndex = 85;\r
@@ -1037,8 +1002,7 @@ namespace Handbrake
             this.check_queryEditorTab.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.check_queryEditorTab.AutoSize = true;\r
             this.check_queryEditorTab.BackColor = System.Drawing.Color.Transparent;\r
-            this.tableLayoutPanel4.SetColumnSpan(this.check_queryEditorTab, 4);\r
-            this.check_queryEditorTab.Location = new System.Drawing.Point(67, 49);\r
+            this.check_queryEditorTab.Location = new System.Drawing.Point(81, 60);\r
             this.check_queryEditorTab.Name = "check_queryEditorTab";\r
             this.check_queryEditorTab.Size = new System.Drawing.Size(241, 17);\r
             this.check_queryEditorTab.TabIndex = 84;\r
@@ -1053,8 +1017,7 @@ namespace Handbrake
             this.check_disablePresetNotification.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.check_disablePresetNotification.AutoSize = true;\r
             this.check_disablePresetNotification.BackColor = System.Drawing.Color.Transparent;\r
-            this.tableLayoutPanel4.SetColumnSpan(this.check_disablePresetNotification, 4);\r
-            this.check_disablePresetNotification.Location = new System.Drawing.Point(67, 95);\r
+            this.check_disablePresetNotification.Location = new System.Drawing.Point(81, 106);\r
             this.check_disablePresetNotification.Name = "check_disablePresetNotification";\r
             this.check_disablePresetNotification.Size = new System.Drawing.Size(222, 17);\r
             this.check_disablePresetNotification.TabIndex = 91;\r
@@ -1069,8 +1032,7 @@ namespace Handbrake
             this.check_inGuiStatus.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.check_inGuiStatus.AutoSize = true;\r
             this.check_inGuiStatus.BackColor = System.Drawing.Color.Transparent;\r
-            this.tableLayoutPanel4.SetColumnSpan(this.check_inGuiStatus, 4);\r
-            this.check_inGuiStatus.Location = new System.Drawing.Point(67, 118);\r
+            this.check_inGuiStatus.Location = new System.Drawing.Point(81, 129);\r
             this.check_inGuiStatus.Name = "check_inGuiStatus";\r
             this.check_inGuiStatus.Size = new System.Drawing.Size(235, 17);\r
             this.check_inGuiStatus.TabIndex = 92;\r
@@ -1482,6 +1444,34 @@ namespace Handbrake
             this.tableLayoutPanel5.Size = new System.Drawing.Size(594, 429);\r
             this.tableLayoutPanel5.TabIndex = 62;\r
             // \r
+            // label33\r
+            // \r
+            this.label33.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
+            this.label33.AutoSize = true;\r
+            this.label33.Location = new System.Drawing.Point(79, 158);\r
+            this.label33.Name = "label33";\r
+            this.label33.Size = new System.Drawing.Size(181, 13);\r
+            this.label33.TabIndex = 94;\r
+            this.label33.Text = "Number of picture previews to scan:";\r
+            // \r
+            // drop_previewScanCount\r
+            // \r
+            this.drop_previewScanCount.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_previewScanCount.FormattingEnabled = true;\r
+            this.drop_previewScanCount.Items.AddRange(new object[] {\r
+            "10",\r
+            "15",\r
+            "20",\r
+            "25",\r
+            "30"});\r
+            this.drop_previewScanCount.Location = new System.Drawing.Point(273, 155);\r
+            this.drop_previewScanCount.Name = "drop_previewScanCount";\r
+            this.drop_previewScanCount.Size = new System.Drawing.Size(85, 21);\r
+            this.drop_previewScanCount.TabIndex = 95;\r
+            this.ToolTip.SetToolTip(this.drop_previewScanCount, "The number of processor\'s / processor cores. Unless your having problems, leave o" +\r
+                    "n Automatic.");\r
+            this.drop_previewScanCount.SelectedIndexChanged += new System.EventHandler(this.drop_previewScanCount_SelectedIndexChanged);\r
+            // \r
             // frmOptions\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);\r
@@ -1516,8 +1506,6 @@ namespace Handbrake
             this.tableLayoutPanel3.PerformLayout();\r
             this.tab_advanced.ResumeLayout(false);\r
             this.tab_advanced.PerformLayout();\r
-            this.tableLayoutPanel4.ResumeLayout(false);\r
-            this.tableLayoutPanel4.PerformLayout();\r
             this.tab_debug.ResumeLayout(false);\r
             this.tab_debug.PerformLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();\r
@@ -1615,7 +1603,6 @@ namespace Handbrake
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;\r
         internal System.Windows.Forms.ComboBox drp_processors;\r
         internal System.Windows.Forms.ComboBox drp_Priority;\r
-        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;\r
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5;\r
         private System.Windows.Forms.CheckBox check_promptOnUnmatchingQueries;\r
         private System.Windows.Forms.TabPage tab_audio_sub;\r
@@ -1629,5 +1616,7 @@ namespace Handbrake
         private System.Windows.Forms.CheckBox check_disableResCalc;\r
         internal System.Windows.Forms.CheckBox check_growlEncode;\r
         internal System.Windows.Forms.CheckBox check_GrowlQueue;\r
+        internal System.Windows.Forms.ComboBox drop_previewScanCount;\r
+        private System.Windows.Forms.Label label33;\r
     }\r
 }
\ No newline at end of file
index 77a7a58..5f5977a 100644 (file)
@@ -36,10 +36,24 @@ namespace Handbrake
                 ToolTip.Active = true;\r
             }\r
 \r
-            // Setup Widgets to match settings.\r
+            // Update Check\r
             if (Properties.Settings.Default.updateStatus)\r
                 check_updateCheck.CheckState = CheckState.Checked;\r
 \r
+            // Days between update checks\r
+            switch (Properties.Settings.Default.daysBetweenUpdateCheck)\r
+            {\r
+                case 1:\r
+                    drop_updateCheckDays.SelectedIndex = 0;\r
+                    break;\r
+                case 7:\r
+                    drop_updateCheckDays.SelectedIndex = 1;\r
+                    break;\r
+                case 30:\r
+                    drop_updateCheckDays.SelectedIndex = 2;\r
+                    break;\r
+            }\r
+\r
             // On Encode Completeion Action\r
             drp_completeOption.Text = Properties.Settings.Default.CompletionOption;\r
 \r
@@ -142,19 +156,8 @@ namespace Handbrake
             if (Properties.Settings.Default.enocdeStatusInGui)\r
                 check_inGuiStatus.CheckState = CheckState.Checked;\r
 \r
-            // Days between update checks\r
-            switch (Properties.Settings.Default.daysBetweenUpdateCheck)\r
-            {\r
-                case 1:\r
-                    drop_updateCheckDays.SelectedIndex = 0;\r
-                    break;\r
-                case 7:\r
-                    drop_updateCheckDays.SelectedIndex = 1;\r
-                    break;\r
-                case 30:\r
-                    drop_updateCheckDays.SelectedIndex = 2;\r
-                    break;\r
-            }\r
+            // Set the preview count\r
+            drop_previewScanCount.SelectedItem = Properties.Settings.Default.previewScanCount.ToString();\r
 \r
             // x264 step\r
             string step = Properties.Settings.Default.x264cqstep.ToString(new CultureInfo("en-US"));\r
@@ -191,6 +194,22 @@ namespace Handbrake
             Properties.Settings.Default.updateStatus = check_updateCheck.Checked;\r
         }\r
 \r
+        private void drop_updateCheckDays_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            switch (drop_updateCheckDays.SelectedIndex)\r
+            {\r
+                case 0:\r
+                    Properties.Settings.Default.daysBetweenUpdateCheck = 1;\r
+                    break;\r
+                case 1:\r
+                    Properties.Settings.Default.daysBetweenUpdateCheck = 7;\r
+                    break;\r
+                case 2:\r
+                    Properties.Settings.Default.daysBetweenUpdateCheck = 30;\r
+                    break;\r
+            }\r
+        }\r
+\r
         private void check_tooltip_CheckedChanged(object sender, EventArgs e)\r
         {\r
             Properties.Settings.Default.tooltipEnable = check_tooltip.Checked;\r
@@ -374,20 +393,10 @@ namespace Handbrake
             Properties.Settings.Default.enocdeStatusInGui = check_inGuiStatus.Checked;\r
         }\r
 \r
-        private void drop_updateCheckDays_SelectedIndexChanged(object sender, EventArgs e)\r
+        \r
+        private void drop_previewScanCount_SelectedIndexChanged(object sender, EventArgs e)\r
         {\r
-            switch (drop_updateCheckDays.SelectedIndex)\r
-            {\r
-                case 0:\r
-                    Properties.Settings.Default.daysBetweenUpdateCheck = 1;\r
-                    break;\r
-                case 1:\r
-                    Properties.Settings.Default.daysBetweenUpdateCheck = 7;\r
-                    break;\r
-                case 2:\r
-                    Properties.Settings.Default.daysBetweenUpdateCheck = 30;\r
-                    break;\r
-            }\r
+            Properties.Settings.Default.previewScanCount = int.Parse(drop_previewScanCount.SelectedItem.ToString());\r
         }\r
 \r
         private void x264step_SelectedIndexChanged(object sender, EventArgs e)\r
index 24a1914..cd09df6 100644 (file)
@@ -35,6 +35,10 @@ namespace Handbrake
             this.mainWindow = mw;\r
             cb_preview.SelectedIndex = 0;\r
             cb_duration.SelectedIndex = 1;\r
+\r
+            cb_preview.Items.Clear();\r
+            for (int i = 1; i <= Properties.Settings.Default.previewScanCount; i++)\r
+                cb_preview.Items.Add(i.ToString());\r
         }\r
 \r
         #region Encode Sample\r