예제 #1
0
        public Compiler()
        {
            InitializeComponent();

            LaunchOptions();

            if (File.Exists("R2_Compiler_conf_gui_OLD.exe"))
            {
                File.Delete(@"R2_Compiler_conf_gui_OLD.exe");
                var uC = new Update_Completed();
                uC.Show();
                update = true;
            }

            const string target1 = @"src\";
            const string target2 = @"cmake\";

            if (!update && !allow)
            {
                if (Directory.Exists(target1) || (Directory.Exists(target2)))
                {
                    const string target3 = @"src\bindings\I_ScriptDev2\sql_mr\";
                    const string target4 = @"src\bindings\I_ScriptDev2\scripts";
                    if (!Directory.Exists(target3) || (!Directory.Exists(target4)))
                    {
                        MessageBox.Show("\\src\\bindings\\I_ScriptDev2 Folder is missing or empty.", "Warning", MessageBoxButtons.OK,
                                        MessageBoxIcon.Warning);
                    }
                }
                else
                {
                    MessageBox.Show("Can't find MaNGOS files.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }

            b = IntPtr.Size != 8;

            for (int i = 1; i <= count; i++)
            {
                comboBox_cpu_core.Items.Add(i);
            }
            comboBox_cpu_core.Text = Settings.Default["cpu"].ToString();

            bw_update.RunWorkerAsync();
        }
        public Compiler()
        {
            InitializeComponent();

            LaunchOptions();

            if (File.Exists("R2_Compiler_conf_gui_OLD.exe"))
            {
                File.Delete(@"R2_Compiler_conf_gui_OLD.exe");
                var uC = new Update_Completed();
                uC.Show();
                update = true;
            }

            const string target1 = @"src\";
            const string target2 = @"cmake\";

            if (!update && !allow)
            {
                if (Directory.Exists(target1) || (Directory.Exists(target2)))
                {
                    const string target3 = @"src\bindings\ScriptDev2\sql_mr\";
                    const string target4 = @"src\bindings\ScriptDev2\scripts";
                    if (!Directory.Exists(target3) || (!Directory.Exists(target4)))
                    {
                        MessageBox.Show("\\src\\bindings\\ScriptDev2 Folder is empty.", "Warning", MessageBoxButtons.OK,
                                        MessageBoxIcon.Warning);
                    }
                }
                else
                {
                    MessageBox.Show("Can't find MaNGOS files.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }

            b = IntPtr.Size != 8;

            for (int i = 1; i <= count; i++)
            {
                comboBox_cpu_core.Items.Add(i);
            }
            comboBox_cpu_core.Text = Settings.Default["cpu"].ToString();

            bw_update.RunWorkerAsync();
        }