/// <summary> /// Switches current game state using information from CurrentState and MainMenu /// </summary> private void SwitchState() { if (GameState != GameState.MainMenu) { GameState = GameState.MainMenu; CurrentScreen = MainMenu; } else { GameState = MainMenu.NextState; switch (MainMenu.NextState) { case GameState.Gameplay: CurrentScreen = GameScreen; GameScreen.StartGame(); break; case GameState.Online: CurrentScreen = OnlineScreen; OnlineScreen.StartGame(); break; case GameState.Credits: CurrentScreen = CreditsScreen; break; case GameState.Exit: Exit(); break; } } }
public void Step_10_GetOnlineScreen() { WaitHelper.Wait(TimeSpan.FromMinutes(1).Milliseconds); OnlineScreen online = new OnlineScreen(dlt.LoadTest); online.WaitForTestFinished(); online.CloseButtonClick(); StartTab startTab = new StartTab(); }
public void Step_25_GetOnlineScreen() { StartRunDialog start = new StartRunDialog(); start.StartRunTestIfAvailable(); OnlineScreen online = new OnlineScreen(dlt.LoadTest); online.WaitForTestFinished(); online.CloseButtonClick(); }
public async Task <OnlineScreenForReturnDto> AddNewOnlineScreenAsync(OnlineScreen onlineScreen) { var checkScreen = await screenDal.GetAsync(x => x.Id == onlineScreen.ScreenId); if (checkScreen != null) { await onlineScreenDal.Add(onlineScreen); } return(mapper.Map <OnlineScreen, OnlineScreenForReturnDto>(onlineScreen)); }
public void Complex([Range(0, 9)] int Itearation) { startTab = new StartTab(); dlt = startTab.ClickLastModifiedTest(testName); dlt.Workload.Run(); StartRunDialog start = new StartRunDialog(); start.StartRunTestIfAvailable(); OnlineScreen online = new OnlineScreen(new LoadTest(testName)); online.WaitForTestFinished(); online.CloseButtonClick(); }
public void Step_10_GetOnlineScreen() { StartRunDialog start = new StartRunDialog(); start.StartRunTestIfAvailable(); // WaitHelper.Wait(TimeSpan.FromMinutes(3).Milliseconds); // <=Sould be replaced for Initialization Form OnlineScreen online = new OnlineScreen(dlt.LoadTest); online.WaitForTestFinished(); online.CloseButtonClick(); }
public async Task ConnectScreen(int screenId, string connectionId) { if (screenId > 0) { var onlineScreen = new OnlineScreen { ScreenId = screenId, ConnectionId = connectionId }; var addNewScreen = await onlineScreenService.AddNewOnlineScreenAsync(onlineScreen); var onlineScreens = await onlineScreenService.GetAllOnlineScreenAsync(); var connectedScreenId = onlineScreens.Select(x => x.ScreenId).ToArray(); await Clients.All.SendAsync("OnlineScreens", connectedScreenId); } }