public MainViewModel(NavigationStore navigationStore, ModalNavigationStore modalNavigationStore) { _navigationStore = navigationStore; _modalNavigationStore = modalNavigationStore; _navigationStore.CurrentViewModelChanged += OnCurrentViewModelChanged; _modalNavigationStore.CurrentViewModelChanged += OnCurrentModalViewModelChanged; }
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); }
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)); }
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); }
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()); }
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); }); }
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); }
protected override void OnInit() { if (CompilationStore.Compilation.Diagnostics.Any()) { NavigationStore.NagivateTo(NavigationStore.PageId.Edit); return; } }
/// <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); }); }
internal void CreateMailbox(IMailboxCreator parent) { NavigationStore.Push(typeof(CreateMailboxPage), parent); var uri = typeof(CreateMailboxPage).ToPageUri(); OnPopupNavigationRequested(new NavigationRequestedEventArgs(uri)); IsPopupVisible = true; }
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); }
/// <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(); }
public LayoutNavigationService(NavigationStore navigationStore, CreateViewModel <TViewModel> createViewModel, CreateViewModel <GlobalMessageViewModel> createGlobalMessageViewModel, CreateViewModel <NavigationBarViewModel> createNavigationBarViewModel) { _navigationStore = navigationStore; _createViewModel = createViewModel; _createGlobalMessageViewModel = createGlobalMessageViewModel; _createNavigationBarViewModel = createNavigationBarViewModel; }
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; }
public App() { _accountStore = new AccountStore(); _navigationStore = new NavigationStore(); _navigationBarViewModel = new NavigationBarViewModel( _accountStore, CreateHomeNavigationService(), CreateAccountNavigationService(), CreateLoginNavigationService()); }
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); }
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); }
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; }
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); }
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); }
public FooterViewModel(NavigationStore navigationStore, UserInterfaceManager userInterfaceManager) { _navigationStore = navigationStore; _navigationStore.HistoryViewModelsUpdated += OnHistoryViewModelsUpdated; _userInterfaceManager = userInterfaceManager; _userInterfaceManager.ThemeUpdated += OnThemeUpdated; NavigateBackCommand = new NavigateBackCommand(_navigationStore); Recalc(); StartTimer(); }