X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=win%2FC%23%2FProgram.cs;h=282f9f528e99a2ba756b823268533bcd19f3f3b3;hb=b8c7cf18f82ad8552e4a79ab3e93794a2e7759e5;hp=0a4e40b4ecc6f817b53a532b748308d4d2ac2b4b;hpb=e4a19a0e658b56e4b37571ff53a5fc1103c8d723;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/win/C#/Program.cs b/win/C#/Program.cs index 0a4e40b4..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,9 +19,26 @@ namespace Handbrake [STAThread] static void Main() { - 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