public override void AddCommands() { NavigationCommands.Add("File", new RelayCommand(() => { AppFrame.Navigate(typeof(Views.App.FileView)); })); NavigationCommands.Add("OpenCarView", new RelayCommand(() => { AppFrame.Navigate(typeof(CarView)); })); NavigationCommands.Add("OpenCustomerView", new RelayCommand(() => { AppFrame.Navigate(typeof(CustomerView)); })); NavigationCommands.Add("OpenEmployeeView", new RelayCommand(() => { AppFrame.Navigate(typeof(EmployeeView)); })); NavigationCommands.Add("OpenSaleView", new RelayCommand(() => { AppFrame.Navigate(typeof(SaleView)); })); }
public void AddCommands() { NavigationCommands.Add("MainMenu", new RelayCommand(() => { MainAppFrame.Navigate(typeof(Views.Domain.MainMenu)); })); NavigationCommands.Add("OpenEmployeeView", new RelayCommand(() => { MainAppFrame.Navigate(typeof(EmployeeView)); })); NavigationCommands.Add("OpenPayCheckView", new RelayCommand(() => { MainAppFrame.Navigate(typeof(Views.Domain.PayCheckView)); })); //NavigationCommands.Add("Login", new RelayCommand(() => //{ // MainAppFrame.Navigate(typeof(Login)); //})); //NavigationCommands.Add("OpenSaleView", new RelayCommand(() => //{ // AppFrame.Navigate(typeof(SaleView)); //})); }
public override void AddCommands() { NavigationCommands.Add("Load", new RelayCommandAsync(async() => { OnLoadingBegins(); DialogWithReturnValue.ReturnValueType retVal = await DialogWithReturnValue.PresentDialogWithReturnValue("Are you sure you want to LOAD model data?", "LOAD"); if (retVal == DialogWithReturnValue.ReturnValueType.OK) { DomainModel.Instance.LoadEnds += OnLoadingEnds; await DomainModel.Instance.LoadAsync(); } else { OnLoadingEnds(); } })); NavigationCommands.Add("Quit", new RelayCommandAsync(async() => { DialogWithReturnValue.ReturnValueType retVal = await DialogWithReturnValue.PresentDialogWithReturnValue("Are you sure you want to QUIT?", "QUIT"); if (retVal == DialogWithReturnValue.ReturnValueType.OK) { Application.Current.Exit(); } })); }
public override void AddCommands() { NavigationCommands.Add("LeadsPage", new RelayCommand(() => { AppFrame.Navigate(typeof(View.Domain.LeadsPage)); })); NavigationCommands.Add("ActiveLeads", new RelayCommand(() => { AppFrame.Navigate(typeof(View.Domain.LeadsPage)); })); NavigationCommands.Add("PendingLeads", new RelayCommand(() => { AppFrame.Navigate(typeof(View.Domain.LeadsPage)); })); NavigationCommands.Add("ClosedLeads", new RelayCommand(() => { AppFrame.Navigate(typeof(View.Domain.LeadsPage)); })); NavigationCommands.Add("Customers", new RelayCommand(() => { AppFrame.Navigate(typeof(View.Domain.CustomersPage)); })); NavigationCommands.Add("Customer", new RelayCommand(() => { AppFrame.Navigate(typeof(View.Domain.CustomerPage)); })); }
public override void AddCommands() { NavigationCommands.Add("OpenFileView", new NavigationCommand(AppFrame, typeof(FileView))); NavigationCommands.Add("OpenCarView", new NavigationCommand(AppFrame, typeof(CarView))); NavigationCommands.Add("OpenCustomerView", new NavigationCommand(AppFrame, typeof(CustomerView))); NavigationCommands.Add("OpenEmployeeView", new NavigationCommand(AppFrame, typeof(EmployeeView))); NavigationCommands.Add("OpenSaleView", new NavigationCommand(AppFrame, typeof(SaleView))); }
public void ExecuteGotoPreviousNavigableFlowStep_CallsNavigationService() { var testSubject = new NavigationCommands(commandServiceMock.Object, issueFlowStepNavigatorMock.Object, loggerMock.Object); testSubject.ExecuteGotoPreviousNavigableFlowStep(null, null); issueFlowStepNavigatorMock.Verify(x => x.GotoPreviousNavigableFlowStep(), Times.Once); issueFlowStepNavigatorMock.VerifyNoOtherCalls(); }
/// <summary> /// This method is used for adding application-specific navigation /// commands into the NavigationCommands dictionary. The keys used /// for the commands should match Tag values on menu items from the /// main application view. /// </summary> public override void AddCommands() { NavigationCommands.Add("OpenMovieView", new NavigationCommand(AppFrame, typeof(Views.Domain.MovieView))); NavigationCommands.Add("OpenTheaterView", new NavigationCommand(AppFrame, typeof(Views.Domain.TheaterView))); NavigationCommands.Add("OpenShowView", new NavigationCommand(AppFrame, typeof(Views.Domain.ShowView))); NavigationCommands.Add("OpenTicketView", new NavigationCommand(AppFrame, typeof(Views.Domain.TicketView))); NavigationCommands.Add("OpenBuyTicketFlow", new NavigationCommand(AppFrame, typeof(Views.Domain.BuyTicketViewStart))); NavigationCommands.Add("Load", new LoadCommand()); NavigationCommands.Add("Save", new SaveCommand()); NavigationCommands.Add("Quit", new QuitCommand()); }
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); await IssueVisualizationToolWindowCommand.InitializeAsync(this); await NavigationCommands.InitializeAsync(this); var componentModel = await GetServiceAsync(typeof(SComponentModel)) as IComponentModel; componentModel.GetService <ISelectedVisualizationValidityMonitor>(); }
public static IEnumerable<INavigationCommand> Then(this IEnumerable<INavigationCommand> commands, INavigationCommand appendCommand) { var newCommands = new NavigationCommands(); foreach (var navigationCommand in commands) { newCommands.Add(navigationCommand); } newCommands.Add(appendCommand); return commands; }
public void ExecuteGotoPreviousNavigableFlowStep_Exception_ExceptionLogged() { issueFlowStepNavigatorMock .Setup(x => x.GotoPreviousNavigableFlowStep()) .Throws(new NotImplementedException("this is a test")); var testSubject = new NavigationCommands(commandServiceMock.Object, issueFlowStepNavigatorMock.Object, loggerMock.Object); Action act = () => testSubject.ExecuteGotoPreviousNavigableFlowStep(null, null); act.Should().NotThrow(); VerifyMessageLogged("this is a test"); }
/// <summary> /// Add valid navigation entries and associated commands. /// </summary> public override void AddCommands() { NavigationCommands.Add("File", new RelayCommand(() => { AppFrame.Navigate(typeof(Views.App.FileView)); })); NavigationCommands.Add("OpenMovieView", new RelayCommand(() => { AppFrame.Navigate(typeof(MovieView)); })); NavigationCommands.Add("OpenStudioView", new RelayCommand(() => { AppFrame.Navigate(typeof(StudioView)); })); }
void m_frame_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e) { //Logger.Log ( Messaging.StatusMessage.Types.Debug, $"m_frame_Navigated. e.Content: {e.Content}, e.Uri: {e.Uri}, m_didIDoThat: {m_didIDoThat}, m_isFirstNavigation: {m_isFirstNavigation}, Back Stack: {this.BackStackToString ( )}" ); if (!m_didIDoThat) { var view = m_frame.Content as IView; if (view != null) { CurrentViewModel = view.ViewModelObject; view.ViewModelObject?.OnSecondaryNavigation( ); } else { CurrentViewModel = null; if (m_frame.Content != null) { Logger.Log(Messaging.StatusMessage.Types.Warn, "Unable to cast Navigation Frame's Content to a IView. Type is '" + m_frame.Content.GetType( ).FullName + "'"); } } } else { m_didIDoThat = false; } DoNavigated( ); if (m_isFirstNavigation && CurrentViewModel != null) { //m_removeBackStackEntryOnNavigate = true; // this will cause the first time we get navigated to to remove the previous page which should be a splash/loading page Logger.Log(Messaging.StatusMessage.Types.Debug, $"Nuking back stack on first run... \r\n{BackStackToString ( )}"); m_isFirstNavigation = false; while (m_frame.CanGoBack) { RemoveBackEntry( ); } } NavigationCommands.Navigated( ); }
/// <summary> /// This method is used for adding application-specific navigation /// commands into the NavigationCommands dictionary. The keys used /// for the commands should match Tag values on menu items from the /// main application view. /// </summary> public override void AddCommands() { NavigationCommands.Add("ShowMovie", new RelayCommand(() => { AppFrame.Navigate(typeof(Views.Domain.Frontpage)); })); NavigationCommands.Add("ShowReservation", new RelayCommand(() => { AppFrame.Navigate(typeof(Views.Domain.SeatReservation)); })); NavigationCommands.Add("ShowPayment", new RelayCommand(() => { AppFrame.Navigate(typeof(Views.Domain.Payment)); })); NavigationCommands.Add("ShowReceipt", new RelayCommand(() => { AppFrame.Navigate(typeof(Views.Domain.ThankYouPage)); })); }
public override void AddCommands() { NavigationCommands.Add("OpenFileView", new NavigationCommand(AppFrame, typeof(FileView))); NavigationCommands.Add("OpenRarityTierView", new NavigationCommand(AppFrame, typeof(RarityTierView))); }
public HomeVM() { NavCommand = new NavigationCommands(this); }
public BarcodePageViewModel() { GeneratorBarcode = new NavigationCommands <GeneratorBarcodePage>(); GeneratorQRCode = new NavigationCommands <GeneratorQRCodePage>(); DetectorAll = new NavigationCommands <ListPage>(() => new ListPageViewModel()); }
public override void AddCommands() { NavigationCommands.Add("Load", new RelayCommand(async() => await DomainModel.Instance.LoadAsync())); NavigationCommands.Add("Save", new RelayCommand(async() => await DomainModel.Instance.SaveAsync())); }