private void morningJobsToolStripMenuItem_Click(object sender, EventArgs e) { JobController jobController=new JobController(); if (morningJobs == null) { morningJobs = new Jobs(jobController); morningJobs.MdiParent = this; morningJobs.FormClosed += new FormClosedEventHandler(morningJobs_FormClosed); morningJobs.Show(); morningJobs.WindowState = FormWindowState.Maximized; } else { morningJobs.Activate(); //morningJobs.Show(); } }
void morningJobs_FormClosed(object sender, FormClosedEventArgs e) { morningJobs=null; //throw new NotImplementedException(); }