summaryrefslogtreecommitdiffstats
path: root/win/C#/frmMain.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-12-21 17:08:55 +0000
committersr55 <[email protected]>2008-12-21 17:08:55 +0000
commit0580ae3259179dd298e4fc49bf17846f4f8dda7d (patch)
treef1ffd133f1bc1a12a0374f94153d9b23ca07c5bc /win/C#/frmMain.cs
parentac1f7bafb2f980eda44bd93e507914ae8aa284dc (diff)
WinGui:
- Removed Experimental folder from project - Typo in Download window fixed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2041 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r--win/C#/frmMain.cs127
1 files changed, 60 insertions, 67 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 6f971eb99..b7a169703 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -47,80 +47,73 @@ namespace Handbrake
public frmMain()
{
- try
- {
- // Load the splash screen in this thread
- Form splash = new frmSplashScreen();
- splash.Show();
-
- //Create a label that can be updated from the parent thread.
- Label lblStatus = new Label();
- lblStatus.Size = new Size(250, 20);
- lblStatus.Location = new Point(10, 280);
- splash.Controls.Add(lblStatus);
- InitializeComponent();
-
- // Update the users config file with the CLI version data.
- lblStatus.Text = "Setting Version Data ...";
+ // Load the splash screen in this thread
+ Form splash = new frmSplashScreen();
+ splash.Show();
+
+ //Create a label that can be updated from the parent thread.
+ Label lblStatus = new Label();
+ lblStatus.Size = new Size(250, 20);
+ lblStatus.Location = new Point(10, 280);
+ splash.Controls.Add(lblStatus);
+ InitializeComponent();
+
+ // Update the users config file with the CLI version data.
+ lblStatus.Text = "Setting Version Data ...";
+ Application.DoEvents();
+ ArrayList x = hb_common_func.getCliVersionData();
+ Properties.Settings.Default.hb_build = int.Parse(x[1].ToString());
+ Properties.Settings.Default.hb_version = x[0].ToString();
+
+ // show the form, but leave disabled until preloading is complete then show the main form
+ this.Enabled = false;
+ this.Show();
+ Application.DoEvents(); // Forces frmMain to draw
+
+ // update the status
+ if (Properties.Settings.Default.updateStatus == "Checked")
+ {
+ lblStatus.Text = "Checking for updates ...";
Application.DoEvents();
- ArrayList x = hb_common_func.getCliVersionData();
- Properties.Settings.Default.hb_build = int.Parse(x[1].ToString());
- Properties.Settings.Default.hb_version = x[0].ToString();
-
- // show the form, but leave disabled until preloading is complete then show the main form
- this.Enabled = false;
- this.Show();
- Application.DoEvents(); // Forces frmMain to draw
-
- // update the status
- if (Properties.Settings.Default.updateStatus == "Checked")
- {
- lblStatus.Text = "Checking for updates ...";
- Application.DoEvents();
- Thread updateCheckThread = new Thread(startupUpdateCheck);
- updateCheckThread.Start();
- }
+ Thread updateCheckThread = new Thread(startupUpdateCheck);
+ updateCheckThread.Start();
+ }
- // Setup the GUI components
- lblStatus.Text = "Setting up the GUI ...";
- Application.DoEvents();
- x264PanelFunctions.reset2Defaults(this); // Initialize all the x264 widgets to their default values
- loadPresetPanel(); // Load the Preset Panel
- treeView_presets.ExpandAll();
- lbl_encode.Text = "";
- queueWindow = new frmQueue(this); // Prepare the Queue
+ // Setup the GUI components
+ lblStatus.Text = "Setting up the GUI ...";
+ Application.DoEvents();
+ x264PanelFunctions.reset2Defaults(this); // Initialize all the x264 widgets to their default values
+ loadPresetPanel(); // Load the Preset Panel
+ treeView_presets.ExpandAll();
+ lbl_encode.Text = "";
+ queueWindow = new frmQueue(this); // Prepare the Queue
- // Load the user's default settings or Normal Preset
- if (Properties.Settings.Default.defaultSettings == "Checked" && Properties.Settings.Default.defaultUserSettings != "")
- {
- Functions.QueryParser presetQuery = Functions.QueryParser.Parse(Properties.Settings.Default.defaultUserSettings);
- presetLoader.presetLoader(this, presetQuery, "User Defaults ");
- }
- else
- loadNormalPreset();
+ // Load the user's default settings or Normal Preset
+ if (Properties.Settings.Default.defaultSettings == "Checked" && Properties.Settings.Default.defaultUserSettings != "")
+ {
+ Functions.QueryParser presetQuery = Functions.QueryParser.Parse(Properties.Settings.Default.defaultUserSettings);
+ presetLoader.presetLoader(this, presetQuery, "User Defaults ");
+ }
+ else
+ loadNormalPreset();
- // Enabled GUI tooltip's if Required
- if (Properties.Settings.Default.tooltipEnable == "Checked")
- ToolTip.Active = true;
+ // Enabled GUI tooltip's if Required
+ if (Properties.Settings.Default.tooltipEnable == "Checked")
+ ToolTip.Active = true;
- //Finished Loading
- lblStatus.Text = "Loading Complete!";
- Application.DoEvents();
- splash.Close();
- splash.Dispose();
- this.Enabled = true;
+ //Finished Loading
+ lblStatus.Text = "Loading Complete!";
+ Application.DoEvents();
+ splash.Close();
+ splash.Dispose();
+ this.Enabled = true;
- // Event Handlers
- if (Properties.Settings.Default.MainWindowMinimize == "Checked")
- this.Resize += new EventHandler(frmMain_Resize);
+ // Event Handlers
+ if (Properties.Settings.Default.MainWindowMinimize == "Checked")
+ this.Resize += new EventHandler(frmMain_Resize);
- // Queue Recovery
- queueRecovery();
- }
- catch (Exception e)
- {
- MessageBox.Show("Error at startup: \n\n" + e);
- }
+ // Queue Recovery
+ queueRecovery();
}
// Startup Functions