diff options
author | sr55 <[email protected]> | 2009-12-19 00:00:41 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-12-19 00:00:41 +0000 |
commit | ee7dc8b072afd25fb0180f22658d4a772f2068b7 (patch) | |
tree | 42a1b44782541430c795037a97345bd63b4e0d97 /win/C#/frmMain.cs | |
parent | ce825a48b43c003f45ace85a2711925a695ffdf0 (diff) |
WinGui:
- Shave ~0.5s of the application startup time by not initialising an XmlSerializer when it's not needed. This is quite expensive.
- Make sure the Activity window is initialised before we try set it's title.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3035 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r-- | win/C#/frmMain.cs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index c6fb58e60..87ea63e92 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -192,8 +192,8 @@ namespace Handbrake {
return this.dvdDriveLabel;
}
-
- if(Path.GetFileNameWithoutExtension(this.sourcePath) != "VIDEO_TS")
+
+ if (Path.GetFileNameWithoutExtension(this.sourcePath) != "VIDEO_TS")
return Path.GetFileNameWithoutExtension(this.sourcePath);
return Path.GetFileNameWithoutExtension(Path.GetDirectoryName(this.sourcePath));
@@ -789,19 +789,19 @@ namespace Handbrake {
if (ActivityWindow == null || !ActivityWindow.IsHandleCreated)
ActivityWindow = new frmActivityWindow(lastAction);
-
- switch (lastAction)
- {
- case "scan":
- ActivityWindow.SetScanMode();
- break;
- case "encode":
- ActivityWindow.SetEncodeMode();
- break;
- default:
- ActivityWindow.SetEncodeMode();
- break;
- }
+ else
+ switch (lastAction)
+ {
+ case "scan":
+ ActivityWindow.SetScanMode();
+ break;
+ case "encode":
+ ActivityWindow.SetEncodeMode();
+ break;
+ default:
+ ActivityWindow.SetEncodeMode();
+ break;
+ }
ActivityWindow.Show();
ActivityWindow.Activate();
|