static void Main(string[] args) { string str = null; if (GetParameter(args, "-version", ref str)) { VersionManager.VersionInfo vers = new VersionManager.VersionInfo(true); vers.SaveXml(System.IO.Path.Combine(Application.StartupPath, "version.xml")); System.Environment.Exit(1); //Application.Exit(); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); FormMain formMain = new FormMain(); // Add event handler for thread exceptions //AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); //Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(formMain.Application_ThreadException); Application.Run(new FormMain()); }
private void InitializeVersions() { localVersion = new VersionManager.VersionInfo(true); new Thread(new ThreadStart(this.OnlineVersionDownloadThreadTask)).Start(); }