コード例 #1
0
ファイル: Program.cs プロジェクト: kharsus/WorldSmith
        static void Main()
        {
            // DataSchema.DataClassGenerator.FindPossibleValuesForKey(@"E:\Dota2SDK\root\scripts\npc\items.txt", "ItemDeclarations");

            #if GENERATECLASSES
            string outputDir = "../../DataClasses/";
            string unitDir = outputDir + "ScriptTypes/";
            string inputDir = "../../DataSchema/";
            DataSchema.DataClassGenerator.GenerateClassForSchema(inputDir + "BaseUnitSchema.txt", unitDir);
            DataSchema.DataClassGenerator.GenerateClassForSchema(inputDir + "HeroSchema.txt", unitDir);
            DataSchema.DataClassGenerator.GenerateClassForSchema(inputDir + "UnitSchema.txt", unitDir);
            DataSchema.DataClassGenerator.GenerateClassForSchema(inputDir + "AbilitySchema.txt", unitDir);
            DataSchema.DataClassGenerator.GenerateClassForSchema(inputDir + "ItemSchema.txt", unitDir);
            #else
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (!Properties.Settings.Default.ranonce)
            {
                InitialSetup initial = new InitialSetup(true);
                if (initial.ShowDialog() == DialogResult.OK) {
                    Properties.Settings.Default.ranonce = true;
                    Properties.Settings.Default.Save();
                }
                else {
                    Application.Exit();
                    return;
                }
            }

            AssetLoadingDialog assets = new AssetLoadingDialog();
            assets.ShowDialog(AssetLoadingDialog.InitialLoad);
            if (Properties.Settings.Default.AddonPath != "")
            {
                assets = new AssetLoadingDialog();
                assets.ShowDialog(AssetLoadingDialog.AddonLoadTasks);
            }
            Application.ApplicationExit += Application_ApplicationExit;

            Application.Run(mainForm = new MainForm());

            Properties.Settings.Default.Save();
            #endif
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: hex6/WorldSmith
        static void Main()
        {
            #if GENERATECLASSES
            GenerateClasses();
            #else
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (!Properties.Settings.Default.ranonce)
            {
                InitialSetup initial = new InitialSetup(true);
                if (initial.ShowDialog() == DialogResult.OK) {
                    Properties.Settings.Default.ranonce = true;
                    Properties.Settings.Default.Save();
                }
                else {
                    Application.Exit();
                    return;
                }
            }

            AssetLoadingDialog assets = new AssetLoadingDialog();
            assets.ShowDialog(AssetLoadingDialog.InitialLoad);
            if (Properties.Settings.Default.AddonPath != "")
            {
                assets = new AssetLoadingDialog();
                assets.ShowDialog(AssetLoadingDialog.AddonLoadTasks);
            }
            Application.ApplicationExit += Application_ApplicationExit;

            System.Threading.Thread.CurrentThread.CurrentUICulture =
                System.Globalization.CultureInfo.CreateSpecificCulture(Properties.Settings.Default.language);

            Application.Run(mainForm = new MainForm());

            Properties.Settings.Default.Save();
            #endif
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: kharsus/WorldSmith
 private void setDotaDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form initial = new InitialSetup(false);
     initial.ShowDialog();
 }