Exemple #1
0
        private void bNewProgram_Click(object sender, EventArgs e)
        {
            CreateProgramCtrl ctrl = new CreateProgramCtrl();

            ctrl.ShowDialog();
            if (ctrl.DialogResult == DialogResult.OK)
            {
                string module = CommonHelper.GetEnumDescription(typeof(Module), ctrl.Module);
                if (ProgramFlow.Exist(ctrl.Module, ctrl.ProductName))
                {
                    MessageBox.Show($"{module}:贴附信息[{ctrl.ProgramName}]已存在!!");
                    return;
                }
                else if (ctrl.ProgramName == string.Empty)
                {
                    MessageBox.Show("请正确输入程序名!!!");
                    return;
                }

                this.lModule.Text        = module;
                this.lProgram.Text       = ctrl.ProgramName;
                this.Flow                = new ProgramFlow(ctrl.ProgramName);
                this.Flow.Module         = ctrl.Module;
                this.Module              = ctrl.Module;
                this.programTree.Enabled = true;
                this.RefreshTree();
            }
        }