public void GoToPage(PageType pageType) { if (_currentPageType == pageType) return; Page pageToCreate = null; if (pageType == PageType.MenuPage) { pageToCreate = new MainMenuPage(); } if (pageType == PageType.GamePage) { pageToCreate = new GamePage (); } if (pageType == PageType.FinalPage) { pageToCreate = new FinalPage (); } if (pageToCreate != null) { _currentPageType = pageType; if (_currentPage != null) { _stage.RemoveAllChildren(); } _currentPage = pageToCreate; _stage.AddChild (_currentPage); _currentPage.Start (); } }
public void GoToPage(PageType pageType) { Page pageToCreate = null; if(pageType == PageType.MainMenuPage) { pageToCreate = new MainMenuPage(); } if(pageType == PageType.InGamePage) { pageToCreate = new InGamePage(); } if(pageToCreate != null) { _currentPageType = pageType; if(_currentPage != null) { _stage.RemoveChild(_currentPage); } _currentPage = pageToCreate; _stage.AddChild(_currentPage); _currentPage.Start(); } }
public App() { // The root page of your application var mainPage = new MainMenuPage(); var navigationPage = new NavigationPage(mainPage); Navigator.Init(navigationPage.Navigation); MainPage = navigationPage; }
public void _004_RefMenegament_RefOfficeSpeciality() { var _menu = new MainMenuPage(_driver); Assert.IsTrue(_menu.MenuContainer.Displayed); _menu.SetabTabBtn.ClickEl(); SwitchToContent(); var _setup = new Setup(_driver); Assert.IsTrue(_setup.IsDisplayed()); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.ReferredOfficeSpecialityTab)); _setup.ReferredOfficeSpecialityTab.ClickEl(); WaitElementIsShown(_setup.ReferredPhysicianSpecialitiesGrid); Assert.IsTrue(_setup.IsDisplayed(_setup.ReferredPhysicianSpecialitiesGrid)); }
static async Task Main(string[] args) { var options = new WalletOptions { Style = new Style { Foreground = ConsoleColor.Blue, Background = ConsoleColor.White, AccentBackground = ConsoleColor.DarkBlue, AccentForeground = ConsoleColor.White } }; using (var page = new MainMenuPage(options)) { await page.RunAsync(); } }
public App() { var splash = new SplashPage(); this.MainPage = new NavigationPage(splash); var mainMenuViewModel = new MainMenuViewModel(this.MainPage.Navigation, new InventoryClient(AppConfig.CreateFromConfigFile().ApiUri)); var mainMenuPage = new MainMenuPage(mainMenuViewModel); this.initializeViewModels = async() => await mainMenuViewModel.InitializeAsync(); this.beginAnimations = async() => await splash.BeginAnimation(); this.navigateToMainMenu = async() => { var navigating = this.MainPage.Navigation.PushAsync(mainMenuPage, true); this.MainPage.Navigation.RemovePage(splash); await navigating; }; }
private ReportPage OpenReports() { _driver.Navigate().Refresh(); if (_driver.Url.Contains("login") || !logged) { Login(); logged = true; } var _mainMenu = new MainMenuPage(_driver); _mainMenu.ReportsTabBtn.Click(); SwitchToContent(); var _reportPage = new ReportPage(_driver); Assert.IsTrue(_reportPage.IsDisplayed()); _reportPage.Body.Click(); return(_reportPage); }
public void _007_Diagnosis() { var _menu = new MainMenuPage(_driver); Assert.IsTrue(_menu.MenuContainer.Displayed); _menu.SetabTabBtn.ClickEl(); SwitchToContent(); var _setup = new Setup(_driver); Assert.IsTrue(_setup.IsDisplayed()); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.DiagnosisManagementTab)); _setup.DiagnosisManagementTab.ClickEl(); WaitElementIsShown(_setup.DiagnosisCodesTab); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.DiagnosisCodesTab)); _setup.DiagnosisCodesTab.ClickEl(); WaitElementIsShown(_setup.DiagnosisGrid); Assert.IsTrue(_setup.IsDisplayed(_setup.DiagnosisGrid)); }
public void Patient_001_PatientsDetails() { var _menu = new MainMenuPage(_driver); Assert.IsTrue(_menu.MenuContainer.Displayed); _menu.PatientsTabBtn.Click(); SwitchToContent(); var _patientGrid = new PatientsGrid(_driver); Assert.IsTrue(_patientGrid.IsDisplayed()); _patientGrid.StatusFilter.SendKeys("Active"); _patientGrid.StatusFilter.SendKeys(Keys.Enter); _patientGrid.FirstCell.Click(); _patientGrid.EditBtn.Click(); Assert.IsTrue(new PatientDetails(_driver).IsDisplayed()); }
public void OpenVehicles() { _driver.Navigate().Refresh(); if (_driver.Url.Contains("login") || !logged) { Login(); logged = true; } mainMenu = new MainMenuPage(_driver); Assert.IsTrue(mainMenu.MenuContainer.Displayed); SwitchToContent(); Assert.IsTrue(new CalendarPage(_driver).IsDisplayed()); SwitchToParent(); mainMenu.OpenVehiclePage(); SwitchToContent(); vehiclePage = new VehiclesPage(_driver); Assert.IsTrue(vehiclePage.IsDisplayed()); }
public void Show(MainMenuPage page) { // In case the main menu is shown in-game, we have to take care of some business if (!IsVisible()) { if (page == MainMenuPage.InGameNormal || page == MainMenuPage.InGameIronman) { GameSystems.TimeEvent.PauseGameTime(); } } // TODO: This seems wrong actually... This should come after hide() mCurrentPage = page; Hide(); UiSystems.SaveGame.Hide(); UiSystems.HideOpenedWindows(false); UiSystems.CharSheet.Hide(); mMainWidget.Show(); mMainWidget.BringToFront(); foreach (var entry in mPageWidgets) { entry.Value.Visible = entry.Key == page; } if (page != MainMenuPage.InGameNormal) { UiSystems.UtilityBar.Hide(); } UiSystems.InGame.ResetInput(); if (!UiSystems.UtilityBar.IsVisible()) { UiSystems.DungeonMaster.Hide(); } }
public void _044_Other_EventMailAudit() { var _menu = new MainMenuPage(_driver); Assert.IsTrue(_menu.MenuContainer.Displayed); _menu.SetabTabBtn.ClickEl(); SwitchToContent(); var _setup = new Setup(_driver); Assert.IsTrue(_setup.IsDisplayed()); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.OtherTab)); _setup.OtherTab.ClickEl(); WaitElementIsShown(_setup.EventMailAuditTab); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.EventMailAuditTab)); _setup.EventMailAuditTab.ClickEl(); _setup.WaitElementIsShown(_setup.EventMailAuditGrid); Assert.IsTrue(_setup.IsDisplayed(_setup.EventMailAuditGrid)); }
public void _029_Inventory_Accessories() { var _menu = new MainMenuPage(_driver); Assert.IsTrue(_menu.MenuContainer.Displayed); _menu.SetabTabBtn.ClickEl(); SwitchToContent(); var _setup = new Setup(_driver); Assert.IsTrue(_setup.IsDisplayed()); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.InventoryTab)); _setup.InventoryTab.ClickEl(); WaitElementIsShown(_setup.NonInventoriedAccessoryItemsTab); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.NonInventoriedAccessoryItemsTab)); _setup.NonInventoriedAccessoryItemsTab.ClickEl(); WaitElementIsShown(_setup.AccessoriesGrid); Assert.IsTrue(_setup.IsDisplayed(_setup.AccessoriesGrid)); }
public override void UpdateState() { base.UpdateState(); if (!inProcess && Input.GetMouseButtonDown(0)) { inProcess = true; fsm.Visiblility(false); MainMenuPage main = GameManager.Instance.ui.GetPage(UIID.MainMenu) as MainMenuPage; main.FadeOut(); GameManager.Instance.cam.State = CameraBehaviourState.To_InGame; GameManager.Instance.level.OnNewLevelLoad(); } else if (inProcess) { if (GameManager.Instance.cam.State == CameraBehaviourState.Static) { GameManager.Instance.ui.ShowPage(UIID.GameHUD); fsm.TranslateState(this, fsm.intoScene); } } }
public void _036_CentralizesSchedule_RegionSettings() { var _menu = new MainMenuPage(_driver); Assert.IsTrue(_menu.MenuContainer.Displayed); _menu.SetabTabBtn.ClickEl(); SwitchToContent(); var _setup = new Setup(_driver); Assert.IsTrue(_setup.IsDisplayed()); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.CentralizedSchedulesTab)); _setup.CentralizedSchedulesTab.ClickEl(); WaitElementIsShown(_setup.RegionSettingsTab); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.RegionSettingsTab)); _setup.RegionSettingsTab.ClickEl(); WaitElementIsShown(_setup.RegionSettingsGrid); Assert.IsTrue(_setup.IsDisplayed(_setup.RegionSettingsGrid)); }
public void _030_Departments_DocTypes() { var _menu = new MainMenuPage(_driver); Assert.IsTrue(_menu.MenuContainer.Displayed); _menu.SetabTabBtn.ClickEl(); SwitchToContent(); var _setup = new Setup(_driver); Assert.IsTrue(_setup.IsDisplayed()); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.DepartmentsTab)); _setup.DepartmentsTab.ClickEl(); WaitElementIsShown(_setup.DocumentTypesTab); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.DocumentTypesTab)); _setup.DocumentTypesTab.ClickEl(); WaitElementIsShown(_setup.DocTypesGrid); Assert.IsTrue(_setup.IsDisplayed(_setup.DocTypesGrid)); }
public void _034_Centers_Organizations() { var _menu = new MainMenuPage(_driver); Assert.IsTrue(_menu.MenuContainer.Displayed); _menu.SetabTabBtn.ClickEl(); SwitchToContent(); var _setup = new Setup(_driver); Assert.IsTrue(_setup.IsDisplayed()); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.CentersTab)); _setup.CentersTab.ClickEl(); WaitElementIsShown(_setup.OrganizationsTab); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.OrganizationsTab)); _setup.OrganizationsTab.ClickEl(); WaitElementIsShown(_setup.OrganizationsGrid); Assert.IsTrue(_setup.IsDisplayed(_setup.OrganizationsGrid)); }
public void _026_Inventory_PurchazingInfo() { var _menu = new MainMenuPage(_driver); Assert.IsTrue(_menu.MenuContainer.Displayed); _menu.SetabTabBtn.ClickEl(); SwitchToContent(); var _setup = new Setup(_driver); Assert.IsTrue(_setup.IsDisplayed()); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.InventoryTab)); _setup.InventoryTab.ClickEl(); WaitElementIsShown(_setup.PurchasingInformationTab); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.PurchasingInformationTab)); _setup.PurchasingInformationTab.ClickEl(); WaitElementIsShown(_setup.PurchasingInfoGrid); Assert.IsTrue(_setup.IsDisplayed(_setup.PurchasingInfoGrid)); }
public void _022_Inventory_ProductDetails() { var _menu = new MainMenuPage(_driver); Assert.IsTrue(_menu.MenuContainer.Displayed); _menu.SetabTabBtn.ClickEl(); SwitchToContent(); var _setup = new Setup(_driver); Assert.IsTrue(_setup.IsDisplayed()); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.InventoryTab)); _setup.InventoryTab.ClickEl(); WaitElementIsShown(_setup.ProductDetailsTab); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.ProductDetailsTab)); _setup.ProductDetailsTab.ClickEl(); WaitElementIsShown(_setup.ModelsGrid); Assert.IsTrue(_setup.IsDisplayed(_setup.ModelsGrid)); }
public void _010_Insurance_Insurances() { var _menu = new MainMenuPage(_driver); Assert.IsTrue(_menu.MenuContainer.Displayed); _menu.SetabTabBtn.ClickEl(); SwitchToContent(); var _setup = new Setup(_driver); Assert.IsTrue(_setup.IsDisplayed()); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.InsuranceTab)); _setup.InsuranceTab.ClickEl(); WaitElementIsShown(_setup.InsuranceInsurancesTab); wait.Until(ExpectedConditions.ElementToBeClickable(_setup.InsuranceInsurancesTab)); _setup.InsuranceInsurancesTab.ClickEl(); WaitElementIsShown(_setup.InsuranceOfficesGrid); Assert.IsTrue(_setup.IsDisplayed(_setup.InsuranceOfficesGrid)); }
public void Menu_000_AllMenuItemsArePresent() { var _menu = new MainMenuPage(_driver); _menu.WaitElementIsShown(_menu.PatientsTabBtn); _menu.WaitElementIsShown(_menu.DocumentsTabBtn); _menu.WaitElementIsShown(_menu.ReportsTabBtn); _menu.WaitElementIsShown(_menu.WorkflowsTabBtn); _menu.WaitElementIsShown(_menu.FormsTabBtn); _menu.WaitElementIsShown(_menu.InventoryTab); _menu.WaitElementIsShown(_menu.SetabTabBtn); _menu.WaitElementIsShown(_menu.ManagementTab); _menu.WaitElementIsShown(_menu.TimesheetsTab); Assert.IsTrue(_menu.PatientsTabBtn.Displayed); Assert.IsTrue(_menu.DocumentsTabBtn.Displayed); Assert.IsTrue(_menu.ReportsTabBtn.Displayed); Assert.IsTrue(_menu.WorkflowsTabBtn.Displayed); Assert.IsTrue(_menu.FormsTabBtn.Displayed); Assert.IsTrue(_menu.InventoryTab.Displayed); Assert.IsTrue(_menu.SetabTabBtn.Displayed); Assert.IsTrue(_menu.ManagementTab.Displayed); Assert.IsTrue(_menu.TimesheetsTab.Displayed); }
public object invokeNewPage(PocPages_t pages) { switch (pages) { case PocPages_t.MainMenuPage: { Page page = new MainMenuPage(); page.DataContext = new MainMenuPageVM(invokeNewPage); frameContent = null; frameContent = page; } break; case PocPages_t.LoginPage: { Page startPage = new LoginPage(); startPage.DataContext = new LoginVM(invokeNewPage); frameContent = null; frameContent = startPage; } break; } return(null); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { switch ((Navigator)value) { case Navigator.MainMenu: var main = new MainMenuPage(); main.DataContext = new MainMenuViewModel(); return(main); case Navigator.ChosenOrder: var scnd = new ChosenOrderPage(); scnd.DataContext = new ChosenOrderViewModel(); return(scnd); case Navigator.Login: var login = new LoginPage(); login.DataContext = new LoginViewModel(); return(login); default: return(null); } }
public void SetGameOverState( int thisGameNumberOfVegetablesEaten, int thisGameNumberOfMeters, int thisGameNumberOfFarts) { if (_currentState == GameStates.GameOver) { return; } if (_stateTransition.IsFading) { return; } ShouldEndApplication = false; _stateTransition.FadeOut(); _afterTransitionAction = new Action( () => { _stateTransition.FadeIn(); _currentState = GameStates.GameOver; _game = null; _menu = null; _score = null; _gameOver = new GameOverPage( matrixScaleProvider: _matrixScaleProvider, assets: _assets, settingsRepository: _settingsRepository, thisGameNumberOfVegetablesEaten: thisGameNumberOfVegetablesEaten, thisGameNumberOfMeters: thisGameNumberOfMeters, thisGameNumberOfFarts: thisGameNumberOfFarts, localizedStringsRepository: _localizedStringsRepository); }); }
public override int ConfirmSelection() { switch (CurrentIndex) { case 0: NavigateToPage = new PartySelectPage(true); return(-2); case 1: if (App.fileHelper.LoadData()) { NavigateToPage = new MainMenuPage(); return(-2); } return(CurrentIndex); case 2: return(-3); default: return(CurrentIndex); } return(-1); }
public NavigationService(ApplicationService applicationService, LogHelper logHelper, QuestHelper questHelper, InMemoryContextHelper inMemoryContextHelper) { LogHelper = logHelper; MainMenu = new MainMenuPage(applicationService, this, LogHelper, questHelper, inMemoryContextHelper); }
private void LoadPages() { mainMenu = new MainMenu(content, graphicsDevice); help = new HelpPage(content, this.graphicsDevice); play = new PlayPage(content, this.graphicsDevice, Game1.GameParameters); loading = new LoadingPage(content, this.graphicsDevice); this.mainMenu.OptionChosen += (sender, e) => { MainMenuPage targetPage = (MainMenuPage)e.Code; switch (targetPage) { case MainMenuPage.Play: this.SwitchPageTo(play); break; case MainMenuPage.Help: this.SwitchPageTo(help); break; case MainMenuPage.Quit: Game1.Quit(); break; } }; this.help.OptionChosen += (sender, e) => { this.SwitchPageTo(mainMenu); }; this.play.OptionChosen += (sender, e) => { MenuNavigationOption option = (MenuNavigationOption)e.Code; switch (option) { case MenuNavigationOption.Back: this.SwitchPageTo(mainMenu); break; case MenuNavigationOption.Next: this.GameParametersReady.Invoke(this, new GameParametersReadyEventArgs(play.GameParametersModel)); this.SwitchPageTo(loading); break; } }; this.mainMenu.Cancelled += (sender, e) => { Game1.Quit(); }; this.play.Cancelled += (sender, e) => { this.SwitchPageTo(mainMenu); }; this.loading.Ready += LoadingOnReady; this.currentPage = mainMenu; MediaPlayer.IsRepeating = true; MediaPlayer.Volume = .6f; MediaPlayer.Play(music); }
public App() { InitializeComponent(); MainPage = new MainMenuPage(); }