private void btnResume_Click(object sender, EventArgs e) { if (CommonFunctions.OpenSaveFile(board)) { GameWindow frame = new GameWindow(board, null, canExitToGameSelect); board.PlayFromSave(); ShowGameWindow(frame); } }
private void btnHost_Click(object sender, EventArgs e) { ConnectDialog networkInfo = new ConnectDialog(false); networkInfo.ShowDialog(this); if (networkInfo.Comm != null) { GameWindow frame = new GameWindow(board, networkInfo.Comm, canExitToGameSelect); board.SetupServer(networkInfo.Comm); ShowGameWindow(frame); } }
private void ShowGameWindow(GameWindow frame) { this.Hide(); frame.ShowDialog(this); //frame has exited exitChoice = frame.ReturnStatus(); if (exitChoice != ExitType.PLAY_MENU) { this.Dispose(); } else { this.Show(); this.BringToFront(); } }
private void btnStartLocal_Click(object sender, EventArgs e) { GameWindow frame = new GameWindow(board, null, canExitToGameSelect); board.PlayLocal(); ShowGameWindow(frame); }