X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=win%2FC%23%2FProgram.cs;h=282f9f528e99a2ba756b823268533bcd19f3f3b3;hb=b8c7cf18f82ad8552e4a79ab3e93794a2e7759e5;hp=a45a6e936f398368d55babdf10b0a29bfc58c071;hpb=918fd3048372137178b1a038e560ea32b84c21f7;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/win/C#/Program.cs b/win/C#/Program.cs index a45a6e93..282f9f52 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -1,6 +1,13 @@ +/* Program.cs + + This file is part of the HandBrake source code. + Homepage: . + It may be used under the terms of the GNU General Public License. */ + using System; -using System.Collections.Generic; using System.Windows.Forms; +using System.IO; +using Handbrake.Presets; namespace Handbrake { @@ -12,10 +19,26 @@ namespace Handbrake [STAThread] static void Main() { - // testing svn: brianmario - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new frmMain()); + 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 1024x620 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + else + { + string logDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\logs"); + if (!Directory.Exists(logDir)) + Directory.CreateDirectory(logDir); + + if (!File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\presets.xml"))) + { + PresetsHandler x = new PresetsHandler(); + x.UpdateBuiltInPresets(); + } + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new frmMain()); + } } } + } \ No newline at end of file