3 This file is part of the HandBrake source code.
\r
4 Homepage: <http://handbrake.fr>.
\r
5 It may be used under the terms of the GNU General Public License. */
\r
8 using System.Windows.Forms;
\r
10 using Handbrake.Presets;
\r
14 static class Program
\r
17 /// The main entry point for the application.
\r
22 // Check the system meets the system requirements.
\r
23 Boolean launch = true;
\r
26 // Make sure the screen resolution is not below 1024x768
\r
27 Screen scr = Screen.PrimaryScreen;
\r
28 if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 720))
\r
30 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);
\r
34 catch (Exception exc)
\r
36 MessageBox.Show("frmMain.cs - systemCheck() " + exc);
\r
39 // Either Launch or Close the Application
\r
42 string appDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake";
\r
43 if (!Directory.Exists(appDir))
\r
44 Directory.CreateDirectory(appDir);
\r
46 string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
\r
47 if (!Directory.Exists(logDir))
\r
48 Directory.CreateDirectory(logDir);
\r
50 if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\presets.xml"))
\r
52 PresetsHandler x = new PresetsHandler();
\r
53 x.updateBuiltInPresets();
\r
56 Application.EnableVisualStyles();
\r
57 Application.SetCompatibleTextRenderingDefault(false);
\r
58 Application.Run(new frmMain());
\r