private static void Main(string[] args) { Arguments = args; LoadConfig(); LoadLanguage(); Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Application.ThreadException += ShowDebug; AppDomain.CurrentDomain.UnhandledException += CatchException; Application.SetCompatibleTextRenderingDefault(true); Application.EnableVisualStyles(); if (Config["AutoCheckUpdate"].Boolean) { CheckUpdate(false); } LoadRegistry(); Merger = new Merger(); Controller = new Controller(); RegistyCommand(); Viewer = new Viewer(); Drawer = new Drawer(); Form = new MainForm(); Form.Shown += OnShown; Drawer.Select(Config["Brush"].Value); Drawer.Color = Config["BrushColor"].Color; Connector = Form.Connector; Connector.AddFile(true, args); RegistyDialog(); Viewer.DialogShown += ViewerDialogShown; Hoster = new Hoster(); Application.Run(Form); }