Exemple #1
0
        static void Main()
        {
#if GENERATECLASSES
            GenerateClasses();
#else
            ConsoleRedirect = new ConsoleStringWriter();
            Console.SetOut(ConsoleRedirect);

            //Set up the crash handler
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;


            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Prompt the user to specify the Dota 2 path if it has not been set
            InitialSetup initial = new InitialSetup(true);
            if (!initial.IsDotaDirSet())
            {
                Application.Exit();
                return;
            }

            // Ensure that the AddOnPath user setting was set
            if (!initial.IsAddOnPathSet())
            {
                Application.Exit();
                return;
            }

            Application.ApplicationExit += Application_ApplicationExit;
            System.Threading.Thread.CurrentThread.CurrentUICulture =
                System.Globalization.CultureInfo.CreateSpecificCulture(Properties.Settings.Default.Language);


            // Extract the Dota 2 pack01_dir VPK file and load all of the data
            AssetLoadingDialog assets = new AssetLoadingDialog();
            assets.ShowDialog(AssetLoadingDialog.InitialLoad);



            //Construct the main form and load the default project (if any).
            MainForm mainForm = new MainForm();
            if (IsLoaddedAddonDirectoryValid())
            {
                mainForm.LoadProject(Properties.Settings.Default.LoadedAddonDirectory);
            }

            CheckForUpdate.Check(true);

            Application.Run(mainForm);

            Properties.Settings.Default.Save();
#endif
        }
Exemple #2
0
 private void checkForUpdatesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     CheckForUpdate.Check();
 }