예제 #1
0
        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());
        }
예제 #2
0
 private void InitializeVersions()
 {
     localVersion = new VersionManager.VersionInfo(true);
     new Thread(new ThreadStart(this.OnlineVersionDownloadThreadTask)).Start();
 }