private void StartGame(bool isServer) { if (gameMainForm == null) { gameMainForm = new NetGameForm(); ((NetGameForm)gameMainForm).Start(clientManager, isServer); gameMainForm.Closed += new EventHandler(gameMainForm_Close); } }
private void button3_Click(object sender, System.EventArgs e) { if (gameMainForm == null) { gameMainForm = new GameMainForm(); //gameMainForm = new NetGameForm(); gameMainForm.Start(true); gameMainForm.Closed += new EventHandler(gameMainForm_Close); } }
private void gameMainForm_Close(Object sender, EventArgs e) { gameMainForm = null; }