private void subStudentList_Click(object sender, EventArgs e) { bool bl = FormCheck(typeof(StudentListForm).Name); if (!bl) //如果窗体没打开,则创建新窗体,同一窗体只允许打开单个 { StudentListForm studentListForm = new StudentListForm(); studentListForm.MdiParent = this; studentListForm.Show(); } }
private void studentListToolStripMenuItem_Click(object sender, EventArgs e) { StudentListForm studentListForm = new StudentListForm(); studentListForm.Show(); }
private void StudentButtom_Click(object sender, EventArgs e) { var form = new StudentListForm(); form.Show(this); }