void mnuCity_Click(object sender, EventArgs e) { Form fc = Application.OpenForms["FrmCity"]; Form fcParentMenu = Application.OpenForms["FrmMainScreen"]; if (fc != null) { fc.Focus(); } else { FrmCity f1 = new FrmCity(); f1.MdiParent = fcParentMenu; f1.Show(); } }
private void cityToolStripMenuItem_Click(object sender, EventArgs e) { Form fc = Application.OpenForms["FrmUserManagement"]; Form fcParentMenu = Application.OpenForms["FrmMainScreen"]; if (fc != null) { fc.Focus(); } else { FrmCity f1 = new FrmCity(); f1.MdiParent = fcParentMenu; f1.Show(); } }
public static void cityFrm(byte player, int city, System.Windows.Forms.Control parent) { wC.show = true; FrmCity frm2 = new FrmCity(player, city); if (parent != null) { string title = parent.Text; parent.Text = ""; wC.show = false; frm2.ShowDialog(); parent.Text = title; } else { wC.show = false; frm2.ShowDialog(); } }