private static void Main(string[] args) { Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(CurrentDomain_AssemblyLoad); try { CLI = new CLIManager(args); CLI.ParseCommands(); IsPortable = CLI.IsCommandExist("p", "portable"); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (Environment.OSVersion.Version.Major >= 6) { SetProcessDPIAware(); } DebugHelper.Init(LogFilePath); LogViewer = new LogViewer(); MainForm = new ValidatorWizard(); SettingsReader.DoWork += SettingsReader_DoWork; SettingsReader.RunWorkerCompleted += MainForm.SettingsReader_RunWorkerCompleted; SettingsReader.RunWorkerAsync(); Application.Run(MainForm); Program.Config.Save(ConfigCoreFilePath); } finally { } }
private static void Main(string[] args) { Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(CurrentDomain_AssemblyLoad); try { IsPortable = CLIHelper.CheckArgs(args, "p", "portable"); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (Environment.OSVersion.Version.Major >= 6) SetProcessDPIAware(); LogViewer = new LogViewer(); MainForm = new ValidatorWizard(); SettingsReader.DoWork += SettingsReader_DoWork; SettingsReader.RunWorkerCompleted += MainForm.SettingsReader_RunWorkerCompleted; SettingsReader.RunWorkerAsync(); Application.Run(MainForm); Program.Config.Write(ConfigCoreFilePath); } finally { } }