예제 #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
파일: FrmMain.cs 프로젝트: lev2048/C_Sharp
 //显示添加新学员窗体
 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);
        }