private void izradaToolStripMenuItem_Click(object sender, EventArgs e) { if (narudbenice == null) { narudbenice = new narudjbenice(korisnikIme, pravaA); narudbenice.MdiParent = this; narudbenice.FormClosed += narudbenice_FormClosed; narudbenice.Show(); narudbenice.WindowState = FormWindowState.Maximized; } else { narudbenice.Close(); narudbenice = new narudjbenice(korisnikIme, pravaA); narudbenice.MdiParent = this; narudbenice.FormClosed += narudbenice_FormClosed; narudbenice.Show(); narudbenice.WindowState = FormWindowState.Maximized; } }
void narudbenice_FormClosed(object sender, FormClosedEventArgs e) { narudbenice = null; //throw new NotImplementedException(); }