/// <summary> /// Hides/shows panels depending on the state of the MainApp. /// </summary> /// <param name="newState">The new state of the MainApp</param> protected void OnMainAppStateChanged(MainApp.State newState) { switch (newState) { case MainApp.State.Started: initialPanel.Enable(); break; case MainApp.State.WaitingForARTarget: initialPanel.Disable(); if (!GroundPlaneHelper.isTracked) { ARTargetPanel.Enable(); } break; case MainApp.State.WaitingForUser: ARTargetPanel.Disable(); startGamePanel.Enable(); break; case MainApp.State.LoadingGame: startGamePanel.Disable(); break; default: break; } }
public void selectNumberAlterResultTextTest(string buttonText, string resultText, MainApp.State state, string expected) { mainApp.setCurrentState(state); string result = mainApp.selectNumberAlterResultText(buttonText, resultText); Assert.Equal(expected, result); }