private void addTextFileToLesson_Click(object sender, EventArgs e) { if (tr == null) { tr = new TXTreader(); tr.MdiParent = this; tr.FormClosed += new FormClosedEventHandler(tr_FormClosed); tr.Show(); tr.changeDir(cdir + "\\" + lesson, lesson); } else { tr.Activate(); } }
private void OpenTXTBtn_Click(object sender, EventArgs e) { TXTreader txt = new TXTreader(); txt.Show(); }
void tr_FormClosed(object sender, FormClosedEventArgs e) { tr = null; }