public void Navigate(NavigateMessage message) { switch (message.NavigateTo) { case NavigateTo.Search: _slideNavigator.GoTo(IndexOfSlide <SearchUserViewModel>()); break; case NavigateTo.Profile: var content = (UserSearch)message.Content; if (content.Url == (GameProfileViewModel.UserGameProfile?.Url ?? String.Empty)) { _slideNavigator.GoForward(); break; } _slideNavigator.GoTo(IndexOfSlide <GameProfileViewModel>(), async() => await GameProfileViewModel.Show((UserSearch)message.Content)); break; case NavigateTo.GameDetails: //TODO: GameDetails navigation here break; case NavigateTo.Forward: _slideNavigator.GoForward(); break; case NavigateTo.Back: _slideNavigator.GoBack(); break; default: throw new ArgumentOutOfRangeException(); } }
public MainContentViewModel() { Slides = new object[] { TellerStory, MainForm, Reminder, LocazationInfor, SpellingGame, Discovery, MediaPlay }; _slideNavigator = new SlideNavigator(this, Slides); _slideNavigator.GoTo(0); EasySlideNavigator.Instance.SlideNavigator = _slideNavigator; }
public MainWindowViewModel() { // _controlService = ControlService; Slides = new object[] { BlackScreen, ShowScreen, LowBattery }; slideNavigator = new SlideNavigator(this, Slides); slideNavigator.GoTo(1); }
private Action ShowNewAccount() { return(() => { SlideNavigator.GoTo( IndexOfSlide <NewAccountViewModel>(), () => NewAccountViewModel.Show(AccountSet)); }); }
public MainViewModel() { CommandManager.RegisterClassCommandBinding(typeof(MainWindow), new CommandBinding(Common.NavigationCommands.ShowProcessCommand, ShowProcessExecuted)); CommandManager.RegisterClassCommandBinding(typeof(MainWindow), new CommandBinding(Common.NavigationCommands.GoBackCommand, GoBackExecuted)); CommandManager.RegisterClassCommandBinding(typeof(MainWindow), new CommandBinding(Common.NavigationCommands.TriggerJobCommand, TriggerJobExecuted, CanTriggerJob)); CommandManager.RegisterClassCommandBinding(typeof(MainWindow), new CommandBinding(Common.NavigationCommands.JobHistoryCommand, JobHistoryExecuted)); Slides = new object[] { ProcessSetViewModel, TriggerJobViewModel, JobStatusViewModel, JobHistoryViewModel }; _slideNavigator = new SlideNavigator(this, Slides); _slideNavigator.GoTo(0); }
public TabViewModel() { GameProfileViewModel = new GameProfileViewModel(this, SimpleIoc.Default.GetInstance <IScrapperService>()); SearchUserViewModel = new SearchUserViewModel(this, SimpleIoc.Default.GetInstance <IScrapperService>(), SimpleIoc.Default.GetInstance <ILoggerService>()); Slides = new object[] { SearchUserViewModel, GameProfileViewModel }; _slideNavigator = new SlideNavigator(this, Slides); _slideNavigator.GoTo(0); }
public MainViewModel() { Init(); InitCommands(); if (IsInDesignMode) { WindowTitle = "WiiScale DesignMode"; } else { WindowTitle = "Wii Scale"; WiiBoardService = ServiceLocator.Current.GetInstance <IWiiBoardService>(); } SlideNavigator = new SlideNavigator(this, Accounts); NewAccountViewModel.SlideNavigator = SlideNavigator; AccountViewModel.SlideNavigator = SlideNavigator; WeightsViewModel.SlideNavigator = SlideNavigator; SlideNavigator.GoTo(0); }
private void ShowCurrentAccount(object sender, ExecutedRoutedEventArgs e) { SlideNavigator.GoTo( IndexOfSlide <AccountViewModel>(), () => AccountViewModel.Show((Account)e.Parameter)); }
private void ShowProcessExecuted(object sender, ExecutedRoutedEventArgs e) { _slideNavigator.GoTo( IndexOfSlide <TriggerJobViewModel>(), () => TriggerJobViewModel.Show((ProcessViewModel)e.Parameter)); }