diff options
author | sr55 <[email protected]> | 2007-11-21 14:50:50 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2007-11-21 14:50:50 +0000 |
commit | 29d3f70f98a37961181bc995d47062f43201f142 (patch) | |
tree | 8ed358fd7e207e05defbaef80269deb1e41d3fc9 /win/C# | |
parent | acd2da1da6770674b3411c788246a2556d92ae09 (diff) |
WinGui:
- Cleaned up the status update code for the splash screen.
- Added option to turn off automatic preset update on each launch.
- Removed some unneeded variables.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1072 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#')
-rw-r--r-- | win/C#/Properties/Settings.Designer.cs | 12 | ||||
-rw-r--r-- | win/C#/Properties/Settings.settings | 3 | ||||
-rw-r--r-- | win/C#/app.config | 3 | ||||
-rw-r--r-- | win/C#/frmDownload.cs | 2 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 55 | ||||
-rw-r--r-- | win/C#/frmOptions.Designer.cs | 39 | ||||
-rw-r--r-- | win/C#/frmOptions.cs | 10 | ||||
-rw-r--r-- | win/C#/frmReadDVD.cs | 1 |
8 files changed, 85 insertions, 40 deletions
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index b21078087..a35ee8dee 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -191,5 +191,17 @@ namespace Handbrake.Properties { this["skipversion"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string updatePresets {
+ get {
+ return ((string)(this["updatePresets"]));
+ }
+ set {
+ this["updatePresets"] = value;
+ }
+ }
}
}
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index 1792fcad8..0af81cbdc 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -44,5 +44,8 @@ <Setting Name="skipversion" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
+ <Setting Name="updatePresets" Type="System.String" Scope="User">
+ <Value Profile="(Default)" />
+ </Setting>
</Settings>
</SettingsFile>
\ No newline at end of file diff --git a/win/C#/app.config b/win/C#/app.config index 7a76e22ad..f71f0560f 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -49,6 +49,9 @@ <setting name="skipversion" serializeAs="String">
<value>0</value>
</setting>
+ <setting name="updatePresets" serializeAs="String">
+ <value />
+ </setting>
</Handbrake.Properties.Settings>
</userSettings>
</configuration>
\ No newline at end of file diff --git a/win/C#/frmDownload.cs b/win/C#/frmDownload.cs index cac6f195d..4fdd10dc4 100644 --- a/win/C#/frmDownload.cs +++ b/win/C#/frmDownload.cs @@ -78,7 +78,7 @@ namespace Handbrake else
this.Invoke(new DownloadCompleteCallback(this.downloadComplete));
}
- catch (Exception exc)
+ catch (Exception)
{
// Do Nothing
}
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 97db9218d..094587357 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -68,32 +68,43 @@ namespace Handbrake Version.Text = "Version " + Properties.Settings.Default.CliVersion;
// update the status
- lblStatus.Text = "Checking for updates ...";
- // redraw the splash screen
- Application.DoEvents();
- // Run the update checker.
if (Properties.Settings.Default.updateStatus == "Checked")
+ {
+ lblStatus.Text = "Checking for updates ...";
+ // redraw the splash screen
+ Application.DoEvents();
+ // Run the update checker.
updateCheck();
- Thread.Sleep(200);
+ Thread.Sleep(200);
+ }
// Update the presets
- lblStatus.Text = "Updaing Presets ...";
- Application.DoEvents();
- updatePresets();
- Thread.Sleep(200);
+ if (Properties.Settings.Default.updatePresets == "Checked")
+ {
+ lblStatus.Text = "Updaing Presets ...";
+ Application.DoEvents();
+ updatePresets();
+ Thread.Sleep(200);
+ }
// Now load the users default if required. (Will overide the above setting)
- lblStatus.Text = "Loading User Default Settings...";
- Application.DoEvents();
- loadNormalPreset();
- loadUserDefaults();
- Thread.Sleep(100);
+ if (Properties.Settings.Default.defaultSettings == "Checked")
+ {
+ lblStatus.Text = "Loading User Default Settings...";
+ Application.DoEvents();
+ loadNormalPreset();
+ loadUserDefaults();
+ Thread.Sleep(100);
+ }
// Enable or disable tooltips
- lblStatus.Text = "Loading Tooltips ...";
- Application.DoEvents();
- tooltip();
- Thread.Sleep(100);
+ if (Properties.Settings.Default.tooltipEnable == "Checked")
+ {
+ lblStatus.Text = "Loading Tooltips ...";
+ Application.DoEvents();
+ ToolTip.Active = true;
+ Thread.Sleep(100);
+ }
// Hide the preset bar if required.
hidePresetBar();
@@ -161,14 +172,6 @@ namespace Handbrake }
}
- private void tooltip()
- {
- if (Properties.Settings.Default.tooltipEnable == "Checked")
- {
- ToolTip.Active = true;
- }
- }
-
private void hidePresetBar()
{
if (Properties.Settings.Default.hidePresets == "Checked")
diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs index 0b26ae8dd..c26b4bb9a 100644 --- a/win/C#/frmOptions.Designer.cs +++ b/win/C#/frmOptions.Designer.cs @@ -41,6 +41,7 @@ namespace Handbrake this.label5 = new System.Windows.Forms.Label();
this.tab_options = new System.Windows.Forms.TabControl();
this.tab_general = new System.Windows.Forms.TabPage();
+ this.check_updatePresets = new System.Windows.Forms.CheckBox();
this.check_showPreset = new System.Windows.Forms.CheckBox();
this.check_tooltip = new System.Windows.Forms.CheckBox();
this.check_updateCheck = new System.Windows.Forms.CheckBox();
@@ -156,7 +157,7 @@ namespace Handbrake this.btn_close.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_close.Location = new System.Drawing.Point(287, 287);
+ this.btn_close.Location = new System.Drawing.Point(288, 297);
this.btn_close.Name = "btn_close";
this.btn_close.Size = new System.Drawing.Size(107, 22);
this.btn_close.TabIndex = 53;
@@ -177,7 +178,7 @@ namespace Handbrake "Lock System",
"Log Off",
"Quit HandBrake"});
- this.drp_completeOption.Location = new System.Drawing.Point(192, 156);
+ this.drp_completeOption.Location = new System.Drawing.Point(192, 170);
this.drp_completeOption.Name = "drp_completeOption";
this.drp_completeOption.Size = new System.Drawing.Size(111, 21);
this.drp_completeOption.TabIndex = 43;
@@ -187,7 +188,7 @@ namespace Handbrake //
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label5.Location = new System.Drawing.Point(13, 158);
+ this.label5.Location = new System.Drawing.Point(13, 173);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(173, 13);
this.label5.TabIndex = 42;
@@ -201,12 +202,13 @@ namespace Handbrake this.tab_options.Location = new System.Drawing.Point(12, 63);
this.tab_options.Name = "tab_options";
this.tab_options.SelectedIndex = 0;
- this.tab_options.Size = new System.Drawing.Size(382, 218);
+ this.tab_options.Size = new System.Drawing.Size(382, 228);
this.tab_options.TabIndex = 58;
//
// tab_general
//
this.tab_general.BackColor = System.Drawing.SystemColors.ControlLight;
+ this.tab_general.Controls.Add(this.check_updatePresets);
this.tab_general.Controls.Add(this.drp_completeOption);
this.tab_general.Controls.Add(this.label5);
this.tab_general.Controls.Add(this.check_showPreset);
@@ -218,10 +220,22 @@ namespace Handbrake this.tab_general.Location = new System.Drawing.Point(4, 22);
this.tab_general.Name = "tab_general";
this.tab_general.Padding = new System.Windows.Forms.Padding(3);
- this.tab_general.Size = new System.Drawing.Size(374, 192);
+ this.tab_general.Size = new System.Drawing.Size(374, 202);
this.tab_general.TabIndex = 0;
this.tab_general.Text = "General";
//
+ // check_updatePresets
+ //
+ this.check_updatePresets.AutoSize = true;
+ this.check_updatePresets.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.check_updatePresets.Location = new System.Drawing.Point(16, 125);
+ this.check_updatePresets.Name = "check_updatePresets";
+ this.check_updatePresets.Size = new System.Drawing.Size(112, 17);
+ this.check_updatePresets.TabIndex = 59;
+ this.check_updatePresets.Text = "Update presets";
+ this.check_updatePresets.UseVisualStyleBackColor = true;
+ this.check_updatePresets.CheckedChanged += new System.EventHandler(this.check_updatePresets_CheckedChanged);
+ //
// check_showPreset
//
this.check_showPreset.AutoSize = true;
@@ -262,7 +276,7 @@ namespace Handbrake //
this.check_userDefaultSettings.AutoSize = true;
this.check_userDefaultSettings.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_userDefaultSettings.Location = new System.Drawing.Point(16, 104);
+ this.check_userDefaultSettings.Location = new System.Drawing.Point(16, 102);
this.check_userDefaultSettings.Name = "check_userDefaultSettings";
this.check_userDefaultSettings.Size = new System.Drawing.Size(166, 17);
this.check_userDefaultSettings.TabIndex = 56;
@@ -274,7 +288,7 @@ namespace Handbrake //
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label2.Location = new System.Drawing.Point(13, 135);
+ this.label2.Location = new System.Drawing.Point(13, 156);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 13);
this.label2.TabIndex = 54;
@@ -286,9 +300,9 @@ namespace Handbrake this.label1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(13, 13);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(55, 13);
+ this.label1.Size = new System.Drawing.Size(76, 13);
this.label1.TabIndex = 0;
- this.label1.Text = "Startup";
+ this.label1.Text = "On Startup";
//
// tab_debug
//
@@ -298,7 +312,7 @@ namespace Handbrake this.tab_debug.Controls.Add(this.label6);
this.tab_debug.Location = new System.Drawing.Point(4, 22);
this.tab_debug.Name = "tab_debug";
- this.tab_debug.Size = new System.Drawing.Size(374, 192);
+ this.tab_debug.Size = new System.Drawing.Size(374, 202);
this.tab_debug.TabIndex = 2;
this.tab_debug.Text = "Debug Options";
//
@@ -323,7 +337,7 @@ namespace Handbrake this.tab_advanced.Location = new System.Drawing.Point(4, 22);
this.tab_advanced.Name = "tab_advanced";
this.tab_advanced.Padding = new System.Windows.Forms.Padding(3);
- this.tab_advanced.Size = new System.Drawing.Size(374, 192);
+ this.tab_advanced.Size = new System.Drawing.Size(374, 202);
this.tab_advanced.TabIndex = 1;
this.tab_advanced.Text = "Advanced";
//
@@ -368,7 +382,7 @@ namespace Handbrake // frmOptions
//
this.BackColor = System.Drawing.SystemColors.ControlLight;
- this.ClientSize = new System.Drawing.Size(407, 316);
+ this.ClientSize = new System.Drawing.Size(407, 328);
this.Controls.Add(this.label7);
this.Controls.Add(this.label8);
this.Controls.Add(this.pictureBox2);
@@ -422,5 +436,6 @@ namespace Handbrake private System.Windows.Forms.Label label8;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.Label label7;
+ internal System.Windows.Forms.CheckBox check_updatePresets;
}
}
\ No newline at end of file diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs index fda77169f..75796ddd2 100644 --- a/win/C#/frmOptions.cs +++ b/win/C#/frmOptions.cs @@ -48,6 +48,11 @@ namespace Handbrake {
check_showPreset.CheckState = CheckState.Checked;
}
+
+ if (Properties.Settings.Default.updatePresets == "Checked")
+ {
+ check_updatePresets.CheckState = CheckState.Checked;
+ }
}
private void check_updateCheck_CheckedChanged(object sender, EventArgs e)
@@ -101,6 +106,11 @@ namespace Handbrake Properties.Settings.Default.hidePresets = check_showPreset.CheckState.ToString();
}
+ private void check_updatePresets_CheckedChanged(object sender, EventArgs e)
+ {
+ Properties.Settings.Default.updatePresets = check_updatePresets.CheckState.ToString();
+ }
+
}
}
\ No newline at end of file diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs index ddc16dbcd..516f746bb 100644 --- a/win/C#/frmReadDVD.cs +++ b/win/C#/frmReadDVD.cs @@ -18,7 +18,6 @@ namespace Handbrake private frmMain mainWindow;
private frmDvdInfo dvdInfo;
private Parsing.DVD thisDvd;
- private Process hbProc;
private delegate void UpdateUIHandler();
public frmReadDVD(string inputFile, frmMain parent, frmDvdInfo dvdInfoWindow)
|