示例#1
0
 void mainForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     mainForm = null;
 }
示例#2
0
 //launches form if not already open
 private void launchMainForm()
 {
     if (mainForm == null)
     {
         mainForm = new MainForm();
         mainForm.Show();
         mainForm.FormClosed += new FormClosedEventHandler(mainForm_FormClosed); //make form null when closed
     }
     else mainForm.Activate();
 }