private void buttonPojazdy_Click(object sender, EventArgs e) { if (girdFormPojazdy == null) { girdFormPojazdy = new FormPojazdy(); girdFormPojazdy.MdiParent = this; girdFormPojazdy.FormClosed += girdFormPojazdy_FormClosed; girdFormPojazdy.Show(); } else { girdFormPojazdy.Activate(); } }
private void girdFormPojazdy_FormClosed(object sender, FormClosedEventArgs e) { girdFormPojazdy = null; }