Beispiel #1
0
 public MainViewModel(NavigationStore navigationStore, ModalNavigationStore modalNavigationStore)
 {
     _navigationStore      = navigationStore;
     _modalNavigationStore = modalNavigationStore;
     _navigationStore.CurrentViewModelChanged      += OnCurrentViewModelChanged;
     _modalNavigationStore.CurrentViewModelChanged += OnCurrentModalViewModelChanged;
 }
Beispiel #2
0
 public HomeViewModel(NavigationStore navigationStore)
 {
     App.AudioPlayer.AudioSelected += () => { OnPropertyChanged(nameof(Image)); };
     Playlists        = new ObservableCollection <Playlist>(App.CurrentAccount.Playlists.Skip(2));
     Recent           = App.CurrentAccount.Playlists[1].Audios;
     _navigationStore = navigationStore;
 }
        public CreateAServerViewModel(NavigationStore navigationStore)
        {
            _navigationStore = navigationStore;

            BackCommand   = new RelayCommand(Back);
            CreateCommand = new RelayCommand(Create);
        }
Beispiel #4
0
        public AccountViewModel(AccountStore accountStore, NavigationStore navigationStore)
        {
            _accountStore = accountStore;

            NavigateHomeCommand = new NavigateCommand <HomeViewModel>(new NavigationService <HomeViewModel>(
                                                                          navigationStore, () => new HomeViewModel(accountStore, navigationStore)));
        }
 public ContactsViewModel(NavigationStore navigationStore, AuthenticationStore authenticationStore, UnitOfWorkFactory unitOfWorkFactory)
 {
     NavigateToRepairCommand       = new NavigateCommand <RepairClientViewModel>(navigationStore, () => new RepairClientViewModel(navigationStore, authenticationStore, unitOfWorkFactory));
     NavigateToStoreClientCommand  = new NavigateCommand <StoreClientViewModel>(navigationStore, () => new StoreClientViewModel(navigationStore, authenticationStore, unitOfWorkFactory));
     NavigateToOrdersClientCommand = new NavigateCommand <OrdersClientViewModel>(navigationStore, () => new OrdersClientViewModel(navigationStore, authenticationStore, unitOfWorkFactory));
     NavigateToExitCommand         = new NavigateCommand <LogInViewModel>(navigationStore, () => new LogInViewModel(navigationStore, authenticationStore, unitOfWorkFactory));
 }
Beispiel #6
0
        protected override void OnStartup(StartupEventArgs e)
        {
            UnitOfWorkFactory   unitOfWorkFactory   = new UnitOfWorkFactory();
            AuthenticationStore authenticationStore = new AuthenticationStore(new AuthenticationService(unitOfWorkFactory));
            NavigationStore     navigationStore     = new NavigationStore();

            //using (var context = new MyContext())
            //{
            //    context.Database.EnsureDeleted();
            //    context.Database.EnsureCreated();

            //    authenticationStore.Register("admin", "admin", "admin", "*****@*****.**", UserType.Admin);

            //    context.SaveChanges();
            //}

            navigationStore.CurrentViewModel = new LogInViewModel(navigationStore, authenticationStore, unitOfWorkFactory);
            MainWindow mainWindow = new MainWindow()
            {
                DataContext = new MainViewModel(navigationStore)
            };

            mainWindow.Show();
            base.OnStartup(e);
        }
Beispiel #7
0
        public NavigationViewModel(
            NavigationStore navigationStore,
            IUnityContainer unityContainer)
        {
            _navigationStore = navigationStore;
            _unityContainer  = unityContainer;
            this.WhenAnyValue(x => x.RecipeView)
            .Where(x => RecipeView)
            .Subscribe(x => GoToRecipeView());

            this.WhenAnyValue(x => x.MainView)
            .Where(x => MainView)
            .Subscribe(x => GoToMainView());

            this.WhenAnyValue(x => x.SettingView)
            .Where(x => SettingView)
            .Subscribe(x => GoToSettingView());

            this.WhenAnyValue(x => x.BarrelView)
            .Where(x => BarrelView)
            .Subscribe(x => GoToBarrelView());

            this.WhenAnyValue(x => x.CustomerView)
            .Where(x => CustomerView)
            .Subscribe(x => GoToCustomerView());


            this.WhenAnyValue(x => x.ReestrView)
            .Where(x => ReestrView)
            .Subscribe(x => GoToReestrView());

            this.WhenAnyValue(x => x.GroupedReestrView)
            .Where(x => GroupedReestrView)
            .Subscribe(x => GoToGropedReestrView());
        }
Beispiel #8
0
        public LoginViewModel(AccountStore accountStore, NavigationStore navigationStore)
        {
            NavigationService <AccountViewModel> navigationService = new NavigationService <AccountViewModel>(
                navigationStore,
                () => new AccountViewModel(accountStore, navigationStore));

            LoginCommand = new LoginCommand(this, accountStore, navigationService);
        }
 public LayoutNavigationService(NavigationStore navigationStore,
                                Func <TViewModel> createViewModel,
                                Func <NavigationBarViewModel> createNavigationBarViewModel)
 {
     _navigationStore = navigationStore;
     _createViewModel = createViewModel;
     _createNavigationBarViewModel = createNavigationBarViewModel;
 }
        public MainMenuViewModel(NavigationStore navigationStore)
        {
            NavigateCreatureCreateMenuCommand = new NavigateCommand <CreatureCreateMenuViewModel>(navigationStore, () => new CreatureCreateMenuViewModel(navigationStore));

            NavigateItemCreateMenuCommand = new NavigateCommand <ItemCreateMenuViewModel>(navigationStore, () => new ItemCreateMenuViewModel(navigationStore));

            QuitCommand = new RelayCommand((par) => { Application.Current.Shutdown(); });
        }
 protected override void ComposeLeftActions(TreeComposer composer)
 {
     Actions.Action(composer, "back", EditorResources.Actions_Back, () =>
     {
         NavigationStore.NagivateTo(NavigationStore.PageId.Edit);
         return(Task.CompletedTask);
     });
 }
Beispiel #12
0
        public EggVideoViewModel(NavigationStore navigationStore,
                                 Settings settings, UserInterfaceManager userInterfaceManager)
        {
            NavigateBackgroundVideo = new NavigateBackgroundVideoAndClearHistoryCommand(navigationStore, userInterfaceManager);

            _settings = settings;
            _settings.SettingsUpdated += _ => OnSettingsUpdated();
        }
        public SelectScheduleForCourseCommand(NavigationStore navigationStore,
                                              NotificationStore notificationStore,
                                              TimeTableDto timeTableData)
        {
            var groupViewModel = new ScheduleForCourseViewModel(timeTableData);

            _navigationService = new NavigationService <ScheduleForCourseViewModel>(navigationStore, groupViewModel);
        }
Beispiel #14
0
 protected override void OnInit()
 {
     if (CompilationStore.Compilation.Diagnostics.Any())
     {
         NavigationStore.NagivateTo(NavigationStore.PageId.Edit);
         return;
     }
 }
Beispiel #15
0
 /// <summary>
 ///     Sets the button of the dashboard button, and loads the cryptocurrencies
 ///     in the piechart and displays the profits/loss in the view
 /// </summary>
 /// <param name="navigationStore">Stores the currently selected viewmodel which is used to display a view</param>
 public WalletViewModel(NavigationStore navigationStore)
 {
     LoadWalletIntoChart(App.UserID);
     DisplayProfitLose();
     DashBoardCommand = new RelayCommand(o =>
     {
         navigationStore.SelectedViewModel = new DashBoardViewModel(navigationStore);
     });
 }
Beispiel #16
0
        internal void CreateMailbox(IMailboxCreator parent)
        {
            NavigationStore.Push(typeof(CreateMailboxPage), parent);

            var uri = typeof(CreateMailboxPage).ToPageUri();

            OnPopupNavigationRequested(new NavigationRequestedEventArgs(uri));
            IsPopupVisible = true;
        }
Beispiel #17
0
        public SelectDegreeCommand(NavigationStore navigationStore, ScheduleManager scheduleManager,
                                   TimeTableDto timeTableData, NotificationStore notificationStore)
        {
            var courseViewModel = new CoursesViewModel(scheduleManager, navigationStore, notificationStore);

            courseViewModel.SetTimeTableData(timeTableData);

            _navigationService = new NavigationService <CoursesViewModel>(navigationStore, courseViewModel);
        }
Beispiel #18
0
        /// <summary>
        ///     Sets the dashboard button of the view and loads the achievements from the database into the view of a specific user
        ///     and sets the navigationstore
        /// </summary>
        /// <param name="navigationStore">Stores the currently selected viewmodel which is used to display a view</param>
        public AchievementViewModel(NavigationStore navigationStore)
        {
            DashBoardCommand = new RelayCommand(o =>
            {
                navigationStore.SelectedViewModel = new DashBoardViewModel(navigationStore);
            });

            addAchievementsToList();
        }
Beispiel #19
0
 public LayoutNavigationService(NavigationStore navigationStore,
                                CreateViewModel <TViewModel> createViewModel,
                                CreateViewModel <GlobalMessageViewModel> createGlobalMessageViewModel,
                                CreateViewModel <NavigationBarViewModel> createNavigationBarViewModel)
 {
     _navigationStore = navigationStore;
     _createViewModel = createViewModel;
     _createGlobalMessageViewModel = createGlobalMessageViewModel;
     _createNavigationBarViewModel = createNavigationBarViewModel;
 }
Beispiel #20
0
 public SelectScheduleTypeCommand(NavigationStore navigationStore,
                                  NotificationStore notificationStore,
                                  ScheduleManager scheduleManager,
                                  TimeTableDto timeTableData)
 {
     _navigationStore   = navigationStore;
     _notificationStore = notificationStore;
     _scheduleManager   = scheduleManager;
     _timeTableData     = timeTableData;
 }
        protected override void OnInit()
        {
            if (CompilationStore.Compilation.Diagnostics.Any())
            {
                NavigationStore.NagivateTo(NavigationStore.PageId.Edit);
                return;
            }

            this.engine.ExecutedStep += this.ExecutedStep;
        }
Beispiel #22
0
 public App()
 {
     _accountStore           = new AccountStore();
     _navigationStore        = new NavigationStore();
     _navigationBarViewModel = new NavigationBarViewModel(
         _accountStore,
         CreateHomeNavigationService(),
         CreateAccountNavigationService(),
         CreateLoginNavigationService());
 }
Beispiel #23
0
        public SelectGroupCommand(NavigationStore navigationStore,
                                  NotificationStore notificationStore,
                                  ScheduleManager scheduleManager,
                                  TimeTableDto timeTableData)
        {
            var groupsViewModel = new ScheduleTypeViewModel(scheduleManager, navigationStore, notificationStore);

            groupsViewModel.SetTimeTableData(timeTableData);

            _navigationService = new NavigationService <ScheduleTypeViewModel>(navigationStore, groupsViewModel);
        }
Beispiel #24
0
        public HomeViewModel(NavigationStore navigationStore)
        {
            _navigationStore = navigationStore;


            PlayCommand          = new RelayCommand(Play);
            CreateAServerCommand = new RelayCommand(CreateAServer);
            CreditsCommand       = new RelayCommand(AsyncCredits);
            OptionsCommand       = new RelayCommand(Options);
            ExitCommand          = new RelayCommand(Exit);
        }
Beispiel #25
0
        public TryNavigateEggVideoCommand(NavigationStore navigationStore,
                                          UserInterfaceManager userInterfaceManager,
                                          Settings settings)
        {
            _navigationStore      = navigationStore;
            _userInterfaceManager = userInterfaceManager;

            var eggVideoViewModel = new EggVideoViewModel(navigationStore, settings, userInterfaceManager);

            _eggVideoNavigationService = new NavigationService <EggVideoViewModel>(navigationStore, eggVideoViewModel);
        }
        public CreateMailboxPage()
        {
            InitializeComponent();
            var parent = (IMailboxCreator)NavigationStore.Pop(typeof(CreateMailboxPage));

            DataContext = new CreateMailboxContext(parent);

            CommandBindings.Add(new CommandBinding(NavigationCommands.Close, OnCancel));
            CommandBindings.Add(new CommandBinding(NavigationCommands.Continue, OnContinue, OnCanContinue));
            NameTextBox.TextChanged += OnNameTextBoxTextChanged;
            Loaded += OnLoaded;
        }
Beispiel #27
0
        public PlaylistEditViewModel(ref Playlist playlistToEdit, NavigationStore navigationStore)
        {
            _playlistToEdit = playlistToEdit;

            string name = string.Copy(playlistToEdit.Name);
            ObservableCollection <Audio> audios = new ObservableCollection <Audio>(playlistToEdit.Audios);

            byte[] imageSource = (byte[])playlistToEdit.Image.Clone();

            _bufferPlaylist  = new Playlist(name, audios, imageSource);
            _navigationStore = navigationStore;
        }
        protected override void OnStartup(StartupEventArgs e)
        {
            NavigationStore navigationStore = new NavigationStore();

            navigationStore.CurrentViewModel = new LoginViewModel(navigationStore);

            MainWindow = new MainWindow()
            {
                DataContext = new MainViewModel(navigationStore)
            };
            MainWindow.Show();
            base.OnStartup(e);
        }
Beispiel #29
0
        protected override void OnStartup(StartupEventArgs startupEvents)
        {
            NavigationStore navigationStore = new NavigationStore();

            navigationStore.CurrentViewModel = new PantallaPrincipalViewModel(navigationStore);
            MainWindow = new MainWindow()
            {
                DataContext = new MainViewModel(navigationStore)
            };
            MainWindow.Show();

            base.OnStartup(startupEvents);
        }
Beispiel #30
0
        public FooterViewModel(NavigationStore navigationStore,
                               UserInterfaceManager userInterfaceManager)
        {
            _navigationStore = navigationStore;
            _navigationStore.HistoryViewModelsUpdated += OnHistoryViewModelsUpdated;

            _userInterfaceManager = userInterfaceManager;
            _userInterfaceManager.ThemeUpdated += OnThemeUpdated;

            NavigateBackCommand = new NavigateBackCommand(_navigationStore);

            Recalc();
            StartTimer();
        }