OSDN Git Service

translate some x264 tooltips...
[handbrake-jp/handbrake-jp.git] / win / C# / Program.cs
1 /*  Program.cs \r
2         \r
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
6 \r
7 using System;\r
8 using System.Windows.Forms;\r
9 using System.IO;\r
10 using Handbrake.Presets;\r
11 \r
12 namespace Handbrake\r
13 {\r
14     static class Program\r
15     {\r
16         /// <summary>\r
17         /// The main entry point for the application.\r
18         /// </summary>\r
19         [STAThread]\r
20         static void Main()\r
21         {\r
22             Screen scr = Screen.PrimaryScreen;\r
23             if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 620))\r
24                 MessageBox.Show("\89æ\96Ê\89ð\91\9c\93x\82ª\8f¬\82³\82·\82¬\82Ü\82·\81B\n" + "\8c»\8dÝ\82Ì\89æ\96Ê\83T\83C\83Y\82Í" + scr.Bounds.Width + "\81~" + scr.Bounds.Height + " \82Å\82·\81B\nHandBrake\82Ì\8eÀ\8ds\82É\82Í\81A1024\81~620\88È\8fã\82Ì\89æ\96Ê\89ð\91\9c\93x\82ª\95K\97v\82Å\82·\81B", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
25             else\r
26             {\r
27                 string logDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\logs");\r
28                 if (!Directory.Exists(logDir))\r
29                     Directory.CreateDirectory(logDir);\r
30 \r
31                 if (!File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\presets.xml")))\r
32                 {\r
33                     PresetsHandler x = new PresetsHandler();\r
34                     x.UpdateBuiltInPresets();\r
35                 }\r
36 \r
37                 Application.EnableVisualStyles();\r
38                 Application.SetCompatibleTextRenderingDefault(false);\r
39                 Application.Run(new frmMain());\r
40             }\r
41         }\r
42     }\r
43 \r
44 }