private void addPostTestToLesson_Click(object sender, EventArgs e) { if (post == null) { post = new postTest(); post.MdiParent = this; post.FormClosed += new FormClosedEventHandler(post_FormClosed); post.Show(); post.changeDir(cdir + "\\" + lesson, lesson); } else { post.Activate(); } }
private void PostTestBtn_Click(object sender, EventArgs e) { postTest post = new postTest(); post.Show(); }
void post_FormClosed(object sender, FormClosedEventArgs e) { post = null; }