示例#1
0
        private void Button3_Click(object sender, EventArgs e)
        {
            CarInfo car = appConfig.GetCarInfo(comboBox2.SelectedItem.ToString(),
                                               comboBox3.SelectedItem.ToString(), comboBox4.SelectedItem.ToString());

            if (!car.Validate())
            {
                MessageBox.Show("验证车型配置文件失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            CarConfig ccfg = car.GetCarConfig();

            string projectName = textBox1.Text;
            string projectPath = comboBox1.Text;
            string developor   = textBox2.Text;


            Project newProject = new Project(car, ccfg, projectName, projectPath, developor);
            bool    overwrite  = false;

recreate:

            if (newProject.StartCreateProject(overwrite, out string error, out string errorDetails))
            {
                this.Hide();
                newProject.NextStatus();
                newProject.SetStatusOpen();
                updateGlobalProjectHandler(newProject);
            }