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);
 }
예제 #3
0
 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);
        }
예제 #5
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);
        }
예제 #6
0
        public NewAccountViewModel()
        {
            AddAccountCommand = new RelayCommand(() =>
            {
                _accountSet.Accounts.Add((Account)Account.Clone());
            });

            GoBackCommand = new RelayCommand(() =>
            {
                if (SlideNavigator == null)
                {
                    return;
                }
                SlideNavigator.GoBack();
            });
        }
예제 #7
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);
        }
예제 #8
0
 private void ShowCurrentAccount(object sender, ExecutedRoutedEventArgs e)
 {
     SlideNavigator.GoTo(
         IndexOfSlide <AccountViewModel>(), () => AccountViewModel.Show((Account)e.Parameter));
 }