private void ProcessEnterButtonPress() { switch (actionBar.ChooseItem()) { case "Start Game": newGameWasStarted = true; Manager.AddActivity(new ArrangeShipsManagerActivity(Manager)); messageBar.ShowMessage("Game was started\nThe first step is arranging ships"); actionBar.ActionBarItems[0] = "New Game"; break; case "New Game": Manager.RemoveAllActivitiesFromManager(); ThisActivityHasFocus = false; break; case "Save Game": messageBar.ShowMessage("Game was saved"); break; case "Load Game": messageBar.ShowMessage("Game was loaded"); break; case "Exit": ThisActivityHasFocus = false; Manager.RemoveFocusFromThisManager(); break; } }
private void ProcessEnterButtonPress() { switch (actionBar.ChooseItem()) { case "Arrange ship": ArrangeShip(); break; case "Show log": UpdateLogMessageBar(); break; case "Clear board": foreach (var item in currentSquares) { item.IsChecked = false; } currentSquares.Clear(); statusMessageBar.ShowMessage(battleshipLogic.StatusTable); break; } }