private void bStartGame_Click(object sender, EventArgs e) { MP Startgame = new MP(true); Visible = false; if (!Startgame.IsDisposed) { Startgame.ShowDialog(); } Visible = true; }
// <--------------------------------------- BUTTONS ------------------------------------> private void bConnect_Click(object sender, EventArgs e) { MP Startgame = new MP(false, textBox1.Text); Visible = false; if (!Startgame.IsDisposed) { Startgame.ShowDialog(); } Visible = true; }