Пример #1
0
        //
        private void tsmiAddStudent_Click(object sender, EventArgs e)
        {
            CloseForm();
            FrmAddStudent objForm = new FrmAddStudent();

            OpenForm(objForm);
        }
Пример #2
0
        /// <summary>
        /// panel 切换到新增学生
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            closeForm();
            FrmAddStudent frmAddStudent = new FrmAddStudent();

            openForm(frmAddStudent);
        }
Пример #3
0
        //显示添加新学员窗体
        private void tsmiAddStudent_Click(object sender, EventArgs e)
        {
            //
            FrmAddStudent objForm = new FrmAddStudent();

            //判断右侧中容器是否已经存在窗口-嵌入的基本步骤
            OpenForm(objForm);
        }
Пример #4
0
 private void tsbAddStudent_Click(object sender, EventArgs e)
 {
     if (objFrmAddStudent == null)
     {
         objFrmAddStudent = new FrmAddStudent();
         objFrmAddStudent.Show();//show this windows
     }
     else
     {
         objFrmAddStudent.Activate();
         objFrmAddStudent.WindowState = FormWindowState.Normal;
     }
 }
Пример #5
0
 //怎样保证对象的唯一性
 private void tsmiAddStudent_Click(object sender, EventArgs e)
 {
     if (objFrmAddStudent == null)
     {
         objFrmAddStudent = new FrmAddStudent();
         objFrmAddStudent.Show();
     }
     else
     {
         objFrmAddStudent.Activate();//激活只能在最小化的时候起作用
         objFrmAddStudent.WindowState = FormWindowState.Normal;
     }
 }
Пример #6
0
 //显示添加新学员窗体
 private void tsmiAddStudent_Click(object sender, EventArgs e)
 {
     CloseForm();
     FrmAddStudent objForm = new FrmAddStudent();
     this.OpenForm(objForm);
 }
Пример #7
0
        //显示添加新学员窗体
        private void tsmiAddStudent_Click(object sender, EventArgs e)
        {
            FrmAddStudent addStudent = new FrmAddStudent();

            OpenForm(addStudent);
        }