diff options
author | sr55 <[email protected]> | 2009-09-02 10:05:31 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-09-02 10:05:31 +0000 |
commit | fcaf0013ed3fe61bdbec8de9a8f1312775779999 (patch) | |
tree | 3297bea665d358a3076589822dba91852fb0cf27 /win/C#/Program.cs | |
parent | 8c95bc6eaf24d7aa76736d985bac02861f290e35 (diff) |
WinGui:
- Fix spelling error with regards to no auto name directory set.
- Lower Res check limit to 620. Should allow overscan tv's to work just fine.
- cleaned up program.cs a bit.
- Fixed the show queue button. It now activates the queue window correctly.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2799 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Program.cs')
-rw-r--r-- | win/C#/Program.cs | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/win/C#/Program.cs b/win/C#/Program.cs index f2bae9661..64ef81b6b 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -19,35 +19,16 @@ namespace Handbrake [STAThread]
static void Main()
{
- // Check the system meets the system requirements.
- Boolean launch = true;
- try
- {
- // Make sure the screen resolution is not below 1024x768
- Screen scr = Screen.PrimaryScreen;
- if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 720))
- {
- MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n" + "Your screen is running at: " + scr.Bounds.Width + "x" + scr.Bounds.Height + " \nScreen resolution is too Low. Must be 1024x720 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- launch = false;
- }
- }
- catch (Exception exc)
- {
- MessageBox.Show("frmMain.cs - systemCheck() " + exc);
- }
-
- // Either Launch or Close the Application
- if (launch)
+ Screen scr = Screen.PrimaryScreen;
+ if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 620))
+ MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n" + "Your screen is running at: " + scr.Bounds.Width + "x" + scr.Bounds.Height + " \nScreen resolution is too Low. Must be 1024x720 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ else
{
- string appDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake";
- if (!Directory.Exists(appDir))
- Directory.CreateDirectory(appDir);
-
- string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
+ string logDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\logs");
if (!Directory.Exists(logDir))
Directory.CreateDirectory(logDir);
- if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\presets.xml"))
+ if (!File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\presets.xml")))
{
PresetsHandler x = new PresetsHandler();
x.updateBuiltInPresets();
@@ -57,8 +38,6 @@ namespace Handbrake Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain());
}
- else
- Application.Exit();
}
}
|