public EventDetailsViewModel(ILocalStorageService localStorageService, INetworkConnectionService networkConnectionService, IMessageDialogService messageDialogService, IEventService eventService) { _localStorageService = localStorageService; _networkConnectionService = networkConnectionService; _messageDialogService = messageDialogService; _eventService = eventService; }
public EpisodeViewModel(Episode episode) { this.fileDownloadService = ServiceLocator.Current.GetInstance<IFileDownloadService>(); this.messageDialogService = ServiceLocator.Current.GetInstance<IMessageDialogService>(); this.DownloadCommand = new RelayCommand(() => DownloadEpisodeAsync(), CanDownloadEpisode); this.PlayCommand = new RelayCommand(PlayEpisode, CanPlayEpisode); this.Episode = episode; }
public StatementDetailViewModel(IStatementRepository dataService, IEventAggregator eventAggregator, IMessageDialogService messageDialogService) : base(eventAggregator) { _statementRepository = dataService; _messageDialogService = messageDialogService; AddTransactionCommand = new DelegateCommand(OnAddTransactionExecute); RemoveTransactionCommand = new DelegateCommand(OnRemoveTransactionExecute, OnRemoveTransactionCanExecute); Transactions = new ObservableCollection <TransactionWrapper>(); }
public MainViewModel( IEventAggregator eventAggregator, INavigationViewModel navigationViewModel, IMessageDialogService messageDialogService) { m_eventAggregator = eventAggregator; m_messageDialogService = messageDialogService; m_eventAggregator .GetEvent <OpenQuestionnaireEditViewEvent>() .Subscribe(OnOpenQuestionnaireTab); NavigationViewModel = navigationViewModel; }
public MainViewModel(INavigationViewModel navigationViewModel, IIndex <string, IDetailViewModel> detailViewModelCreator, IEventAggregator eventAggregator, IMessageDialogService messageDialogeService) { _eventAggregator = eventAggregator; _messageDialogService = messageDialogeService; DetailViewModels = new ObservableCollection <IDetailViewModel>(); NavigationViewModel = navigationViewModel; _detailViewModelCreator = detailViewModelCreator; _eventAggregator.GetEvent <OpenDetailEvent>().Subscribe(OnOpenDetailViewAsync); CreateNewDetailCommand = new DelegateCommand <Type>(OnCreateNewDetailExecute); _eventAggregator.GetEvent <AfterDeleteEvent>().Subscribe(OnDelete); _eventAggregator.GetEvent <AfterDetailCloseEvent>().Subscribe(AfterDetailClose); OpenSingDetailViewCommand = new DelegateCommand <Type>(OpenSingDetailExecute); }
public StartPageViewModel(IRegionManager regionManager, IRBACManager rBACManager, IMessageDialogService dialogService) { _regionManager = regionManager; _rBACManager = rBACManager; _dialogService = dialogService; OrdersCommand = new DelegateCommand(OnOrdersCommandExecute); CustomersCommand = new DelegateCommand(OnCustomersCommandExecute); SettingsCommand = new DelegateCommand(OnSettingsCommandExecute); AddOrderCommand = new DelegateCommand(OnAddOrderExecute); StatsCommand = new DelegateCommand(OnStatsCommandExecute); SearchCommand = new DelegateCommand <object>(OnSearchExecute); }
public ViewABCViewModel( IEventAggregator eventAggregator, IMessageDialogService messageDialogService) : base(eventAggregator, messageDialogService) { Int64 startTicks = Log.CONSTRUCTOR("Enter", Common.LOG_CATEGORY); // TODO(crhodes) // Save constructor parameters here InitializeViewModel(); Log.CONSTRUCTOR("Exit", Common.LOG_CATEGORY, startTicks); }
public ProgrammingLanguageDetailViewModel( IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IProgrammingLanguageRepository programmingLanguageRepository) : base(eventAggregator, messageDialogService) { _programmingLanguageRepository = programmingLanguageRepository; Title = "Programming Languages"; ProgrammingLanguages = new ObservableCollection <ProgrammingLanguageWrapper>(); AddCommand = new DelegateCommand(OnAddExecute); RemoveCommand = new DelegateCommand(OnRemoveExecute, OnRemoveCanExecute); }
public ClientDetailViewModel(IClientRepository clientDataService, IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IProgrammingLanguageLookupDataService programmingLanguageLookupDataService) { _clientRepository = clientDataService; _eventAggregator = eventAggregator; _messageDialogService = messageDialogService; _programmingLanguageLookupDataService = programmingLanguageLookupDataService; SaveCommand = new DelegateCommand(OnSaveExecute, OnSaveCanExecute); DeleteCommand = new DelegateCommand(OnDeleteExecute); ProgrammingLanguages = new ObservableCollection <LookupItem>(); }
public FriendDetailViewModel(IFriendRepository friendRepository, IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IProgrammingLanguageLookUpDataService programmingLanguageLookUpDataService) : base(eventAggregator, messageDialogService) { _friendRepository = friendRepository; _programmingLanguageLookUpDataService = programmingLanguageLookUpDataService; AddPhoneNumberCommand = new DelegateCommand(OnAddPhoneNumberExecute); RemovePhoneNumberCommand = new DelegateCommand(OnRemovePhoneNumberExecute, OnRemovePhoneNumberCanExecute); ProgrammingLanguages = new ObservableCollection <LookUpItem>(); PhoneNumbers = new ObservableCollection <FriendPhoneNumberWrapper>(); }
public RecipientDetailViewModel(IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IRecipientRepository recipientRepository) : base(eventAggregator, messageDialogService) { _recipientRepository = recipientRepository; eventAggregator.GetEvent <AfterDetailSavedEvent>().Subscribe(AfterDetailSaved); eventAggregator.GetEvent <AfterDetailDeletedEvent>().Subscribe(AfterDetailDeleted); AddPaymentCommand = new DelegateCommand(OnAddPaymentExecute); ViewPaymentCommand = new DelegateCommand(OnViewPaymentExecute, OnViewPaymentCanExecute); PaymentLookup = new ObservableCollection <LookupItem>(); }
public MainViewModel( IIndex <string, IViewModel> viewModelCreator, IEventAggregator eventAggregator, IMessageDialogService messageDialogService) { _eventAggregator = eventAggregator; _viewModelCreator = viewModelCreator; _messageDialogService = messageDialogService; _eventAggregator.GetEvent <LoginSuccessEvent>().Subscribe(HandleLoginSuccess); ViewModel = _viewModelCreator[nameof(LoginViewModel)]; }
public MeetingDetailViewModel(IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IMeetingRepository meetingRepository) : base(eventAggregator) { _meetingRepository = meetingRepository; _messageDialogService = messageDialogService; AddedFriends = new ObservableCollection <Friend>(); AvailableFriends = new ObservableCollection <Friend>(); AddFriendCommand = new DelegateCommand(OnAddFriendExecute, OnAddFriendCanExecute); RemoveFriendCommand = new DelegateCommand(OnRemoveFriendExecute, OnRemoveFriendCanExecute); }
public EmployeeViewModel(IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IEmployeeService employeeService) { _eventAggregator = eventAggregator; _messageDialogService = messageDialogService; _employeeService = employeeService; SaveCommand = new DelegateCommand(OnSaveExecute, OnSaveCanExecute); ResetCommand = new DelegateCommand(OnResetExecute, OnResetCanExecute); DeleteCommand = new DelegateCommand(OnDeleteExecute, OnDeleteCanExecute); }
public OrderListViewModel(ERServiceDbContext context, IRegionManager regionManager, IRBACManager rBACManager, IMessageDialogService messageDialogService, IEventAggregator eventAggregator) : base(context, regionManager, eventAggregator) { _rbacManager = rBACManager; _dialogService = messageDialogService; SearchCommand = new DelegateCommand(OnSearchExecute); _eventAggregator.GetEvent <SearchQueryEvent <Order> >().Subscribe(OnSearchRequest); Orders = new ObservableCollection <OrderWrapper>(); Models.CollectionChanged += Models_CollectionChanged; }
public ProgrammingLanguageDetailsViewModel( IProgrammingLanguagesService programmingLanguagesService, IEventAggregator eventAggregator, IMessageDialogService messageDialogService) : base(eventAggregator, messageDialogService) { Title = "Programming Languages"; ProgrammingLanguages = new ObservableCollection <ProgrammingLanguageModelWrapper>(); this._programmingLanguagesService = programmingLanguagesService; AddCommand = new DelegateCommand(OnAddProgramminLanguageExecute); RemoveCommand = new DelegateCommand(OnRemoveProgramminLanguageExecute, OnRemoveProgramminLanguageCanExecute); }
public MeetingDetailViewModel(IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IMeetingRepository meetingRepository) : base(eventAggregator, messageDialogService) { _meetingRepository = meetingRepository; eventAggregator.GetEvent <AfterDetailSavedEvent>().Subscribe(AfterDetailSaved); eventAggregator.GetEvent <AfterDetailDeletedEvent>().Subscribe(AfterDetailDeleted); AddedFriends = new ObservableCollection <Friend>(); AvailableFriends = new ObservableCollection <Friend>(); AddFriendCommand = new DelegateCommand(OnAddFriendExecute, OnAddFriendCanExecute); RemoveFriendCommand = new DelegateCommand(OnRemoveFriendExecute, OnRemoveFriendCanExecute); }
public PodcastsViewModel(IPodcastService podcastService, INavigationService navigationService, IMessageDialogService dialogService) : base() { this.podcastService = podcastService; this.navigationService = navigationService; this.dialogService = dialogService; this.podcasts = new ObservableCollection<PodcastViewModel>(); this.AddPodcastCommand = new RelayCommand(AddPodcastAsync,CanAddPodcast); this.loadedPodcasts = false; MessengerInstance.Register<LoadPodcastsMessage>(this, message => LoadPodcastsAsync()); MessengerInstance.Register<DeletePodcastMessage>(this, message => DeletePodcastAsync(message)); MessengerInstance.Register<CheckForNewEpsiodesMessage>(this, message => CheckForNewEpisodesAsync()); }
public MainViewModel(INavigationViewModel navigationViewModel, Func <IFriendDetailViewModel> friendDetailViewModelCreator, IEventAggregator eventAggregator, IMessageDialogService messageDialogService) { _friendDetailViewModelCreator = friendDetailViewModelCreator; _eventAggregator = eventAggregator; _messageDialogService = messageDialogService; _eventAggregator.GetEvent <OpenDetailViewEvent>().Subscribe(OnOpenDetailView); _eventAggregator.GetEvent <AfterDetailDeletedEvent>().Subscribe(AfterDetailDeleted); CreateNewDetailCommand = new DelegateCommand <Type>(OnCreateNewDetailExecute); NavigationViewModel = navigationViewModel; }
public PodcastsViewModel(IPodcastService podcastService, INavigationService navigationService, IMessageDialogService dialogService) : base() { this.podcastService = podcastService; this.navigationService = navigationService; this.dialogService = dialogService; this.podcasts = new ObservableCollection <PodcastViewModel>(); this.AddPodcastCommand = new RelayCommand(AddPodcastAsync, CanAddPodcast); this.loadedPodcasts = false; MessengerInstance.Register <LoadPodcastsMessage>(this, message => LoadPodcastsAsync()); MessengerInstance.Register <DeletePodcastMessage>(this, message => DeletePodcastAsync(message)); MessengerInstance.Register <CheckForNewEpsiodesMessage>(this, message => CheckForNewEpisodesAsync()); }
public AvailableCarsViewModel(IMessageDialogService messageDialogService, IPreflightService preflightService, ICarTypeLookupDataRepository carTypeLookupDataService, ICarRepository carRepository, IBookingRepository bookingRepository) { _carTypeLookupDataService = carTypeLookupDataService; _carRepository = carRepository; _bookingRepository = bookingRepository; _messageDialogService = messageDialogService; _preflightService = preflightService; FilterCommand = new DelegateCommand(OnFilterExecute); RentCommand = new DelegateCommand(OnRentExecute, OnRentCanExecute); CarTypes = new ObservableCollection <LookupItem>(); Cars = new ObservableCollection <CarWrapper>(); }
public PrintTemplateSettingsViewModel(IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IRegionManager regionManager, IPrintTemplateRepository templateRepository) : base(eventAggregator, messageDialogService) { Title = "Ustawienia szablonów"; _regionManager = regionManager; _templateRepository = templateRepository; Templates = new ObservableCollection <PrintTemplate>(); EditTemplateCommand = new DelegateCommand(OnEditTemplateExecute, OnEditTemplateCanExecute); AddTemplateCommand = new DelegateCommand(OnAddTemplateExecute); }
public ProjectNavigatorViewModel(IProjectRepository projectRepository, IEventAggregator eventAggregator, IMessageDialogService messageDialogService) { _eventAggregator = eventAggregator; _projectRepository = projectRepository; _messageDialogService = messageDialogService; Projects = new ObservableCollection <ProjectWrapper>(); _eventAggregator.GetEvent <EditDetailEvent>().Subscribe(OnEditDetail); _eventAggregator.GetEvent <DeleteDetailEvent>().Subscribe(OnDeleteDetailExecute); _eventAggregator.GetEvent <RefreshListEvent>().Subscribe(OnRefreshList); LoadDataCommand = new DelegateCommand(OnLoadDataExecute); }
public SubmitClueViewModel( IDataService dataService, IImageService imageService, INavigationService navigationService, IMessageDialogService messageDialogService, ISettingsService settingsService) { _navigationService = navigationService; _dataService = dataService; _imageService = imageService; _messageDialogService = messageDialogService; _settingsService = settingsService; _submitPhotoCommand = new Command(e => Submit(), e => CanSubmit); }
public FriendDetailViewModel(IFriendRepository dataService, IEventAggregator eventAggregator, IMessageDialogService messageDialogService, ILookupDataService lookupDataService) : base(eventAggregator, messageDialogService) { _dataService = dataService; _lookupDataService = lookupDataService; eventAggregator.GetEvent <AfterCollectionSaveEvent>().Subscribe(AfterCollectionSaved); AddPhoneNumberCommand = new DelegateCommand(OnAddPhoneNumberExecute); RemovePhoneNumberCommand = new DelegateCommand(OnRemovePhoneNumberExecute, OnRemovePhoneNumberCanExecute); ProgrammingLanguages = new ObservableCollection <LookupItem>(); PhoneNumbers = new ObservableCollection <FriendPhoneNumberWrapper>(); }
public EmployeeDetailViewModel(IEventAggregator eventAggregator, IDepartmentLookupDataService employeeTypeLookupDataService, IEmployeeDataService employeeDS, IMessageDialogService messageDialogService) : base(eventAggregator) { Title = "Employees"; _employeeDS = employeeDS; _employeeTypeLookupDataService = employeeTypeLookupDataService; Employees = new ObservableCollection <EmployeesWrapper>(); Departments = new ObservableCollection <LookupItem>(); FilterCommand = new DelegateCommand(OnFilterExecuteAsync); _searchEmployee = new Employee(); MessageDialogService = messageDialogService; }
public CustomerListViewModel( ERServiceDbContext context, IRegionManager regionManager, IEventAggregator eventAggregator, IRBACManager rBACManager, IMessageDialogService dialogService) : base(context, regionManager, eventAggregator) { _rbacManager = rBACManager; _dialogService = dialogService; SearchCommand = new DelegateCommand(OnSearchExecute); _eventAggregator.GetEvent <SearchQueryEvent <Customer> >().Subscribe(OnSearchRequest); }
public NotificationListViewModel( IRegionManager regionManager, IOrderRepository orderRepository, IEventAggregator eventAggregator, IMessageDialogService messageDialogService) : base(eventAggregator, messageDialogService) { _orderRepository = orderRepository; _regionManager = regionManager; Orders = new ObservableQueue <DisplayableOrderItem>(4); ShowOrderCommand = new DelegateCommand <object>(OnShowOrderExecute); _eventAggregator.GetEvent <AfterNewOrdersAddedEvent>().Subscribe(OnNewOrdersAdded, ThreadOption.UIThread); }
// Switched to the model where creation happens properly. public MainViewModel(INavigationViewModel navigationViewModel, Func <IFriendDetailViewModel> friendDetailViewModelCreator, IEventAggregator eventAggregator, IMessageDialogService messageDialogService) { _friendDetailViewModelCreator = friendDetailViewModelCreator; _eventAggregator = eventAggregator; _messageDialogService = messageDialogService; NavigationViewModel = navigationViewModel; _eventAggregator.GetEvent <OpenFriendDetailViewEvent>() .Subscribe(OnOpenFriendDetailView); }
public CodeSnippetManagerViewModel(INavigationViewModel navigationViewModel, Func <ISnippetDetailViewModel> snippetDetailViewModelCreator, IEventAggregator eventAggregator, IMessageDialogService messageDialogService) { _eventAggregator = eventAggregator; _snippetDetailViewModelCreator = snippetDetailViewModelCreator; _messageDialogService = messageDialogService; _eventAggregator.GetEvent <OpenCodeSnippetDetailViewEvent>() .Subscribe(OnOpenCodeSnippetDetailView); this.NavigationViewModel = navigationViewModel; }
public StatementWindowViewModel(INavigationViewModel navigationViewModel, Func <IStatementDetailViewModel> statementDetailViewModelCreator, IEventAggregator eventAggregator, IMessageDialogService messageDialogService) { NavigationViewModel = navigationViewModel; _statementDetailViewModelCreator = statementDetailViewModelCreator; _eventAggregator = eventAggregator; _messageDialogService = messageDialogService; _eventAggregator.GetEvent <OpenDetailViewEvent>().Subscribe(OnOpenDetailView); _eventAggregator.GetEvent <AfterDetailDeletedEvent>().Subscribe(AfterDetailDeleted); CreateNewStatementCommand = new DelegateCommand(OnCreateNewStatementExecute); }
public CoffeeVideoViewModel(CloudBlockBlob cloudBlockBlob, ICoffeeVideoStorage coffeeVideoStorage, IFilePickerDialogService filePickerDialogService, IMessageDialogService messageDialogService, IMainViewModel mainViewModel) { _cloudBlockBlob = cloudBlockBlob ?? throw new ArgumentNullException(nameof(cloudBlockBlob)); _filePickerDialogService = filePickerDialogService; _messageDialogService = messageDialogService; _mainViewModel = mainViewModel; _coffeeVideoStorage = coffeeVideoStorage; }
public FileExplorerViewModel( IClipboardService clipboard, IFileIconProvider fileIconProvider, IMessageDialogService messageDialogService, bool allowMultipleSelection, IObservable <IFilter <FileSystemEntry> >?filter = null) { _currentFolder = new Folder(new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.Desktop))); AddressBar = new FileExplorerAddressBarViewModel(); FileExplorerTree = new FileExplorerTreeViewModel(); filter ??= DefaultFilterObservable; var searchTextFilter = from searchText in this.WhenAnyValue(vm => vm.SearchText) select Filter.String.Contains(searchText, StringComparison.OrdinalIgnoreCase) .Cast <string, FileSystemEntry>(e => e.Name); filter = Observable.CombineLatest(filter, searchTextFilter, (f, s) => f.And(s)); FileExplorerFolder = new FileExplorerFolderViewModel( clipboard, fileIconProvider, messageDialogService, allowMultipleSelection, filter); FileOpened = _fileOpened.AsObservable(); NavigateBackCommand = ReactiveCommand.Create( NavigateBack, this.WhenAnyValue(vm => vm.CanNavigateBack)); NavigateForwardCommand = ReactiveCommand.Create( NavigateForward, this.WhenAnyValue(vm => vm.CanNavigateForward)); NavigateUpCommand = ReactiveCommand.Create( NavigateUp, this.WhenAnyValue(vm => vm.CurrentFolder).Select(x => x.Parent != null)); AddressBar.AddressChanged.Subscribe(address => NavigateToAddress(address)); FileExplorerTree.SelectedFolderChanged.Subscribe(folder => NavigateTo(folder)); FileExplorerFolder.FolderOpened.Subscribe(folder => NavigateTo(folder)); FileOpened = FileExplorerFolder.FileOpened; this.WhenAnyValue(vm => vm.CurrentFolder) .Subscribe(CurrentFolderChanged); }
public MainViewModel(INavigationViewModel navigationViewModel, Func <IClientDetailViewModel> clientDetailViewModelCreator, IEventAggregator eventAggregator, IMessageDialogService messageDialogService) { _clientDetailViewModelCreator = clientDetailViewModelCreator; _eventAggregator = eventAggregator; _messageDialogService = messageDialogService; _eventAggregator.GetEvent <OpenClientDetailViewEvent>() .Subscribe(OnOpenClientDetailView); _eventAggregator.GetEvent <AfterClientDeletedEvent>() .Subscribe(AfterClientDeleted); CreateNewClientCommand = new DelegateCommand(OnCreateNewClientExecute); NavigationViewModel = navigationViewModel; }
public MainViewModel(IEventAggregator eventAggregator, IMessageDialogService messageDialogService, INavigationViewModel navigationViewModel, Func<IFriendEditViewModel> friendEditViewModelCreator) { _eventAggregator = eventAggregator; _messageDialogService = messageDialogService; _eventAggregator.GetEvent<OpenFriendEditViewEvent>().Subscribe(OnOpenFriendTab); _eventAggregator.GetEvent<FriendDeletedEvent>().Subscribe(OnFriendDeleted); NavigationViewModel = navigationViewModel; _friendEditViewModelCreator = friendEditViewModelCreator; FriendEditViewModels = new ObservableCollection<IFriendEditViewModel>(); CloseFriendTabCommand = new DelegateCommand(OnCloseFriendTabExecute); AddFriendCommand = new DelegateCommand(OnAddFriendExecute); }
public FriendEditViewModel(IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IFriendDataProvider friendDataProvider, ILookupProvider<FriendGroup> friendGroupLookupProvider) { _eventAggregator = eventAggregator; _messageDialogService = messageDialogService; _friendDataProvider = friendDataProvider; _friendGroupLookupProvider = friendGroupLookupProvider; SaveCommand = new DelegateCommand(OnSaveExecute, OnSaveCanExecute); ResetCommand = new DelegateCommand(OnResetExecute, OnResetCanExecute); DeleteCommand = new DelegateCommand(OnDeleteExecute, OnDeleteCanExecute); AddEmailCommand = new DelegateCommand(OnAddEmailExecute); RemoveEmailCommand = new DelegateCommand(OnRemoveEmailExecute, OnRemoveEmailCanExecute); }
public CustomersViewModel( IMessageDialogService messageDialogService, ICustomersRepository customersRepository, IOrdersRepository ordersRepository) { _messageDialogService = messageDialogService; _customersRepository = customersRepository; _ordersRepository = ordersRepository; Customers = new ObservableCollection<CustomerWrapper>( _customersRepository.GetCustomers().Select(x => new CustomerWrapper(x))); OrderStatuses = new ObservableCollection<OrderStatusWrapper>( _ordersRepository.GetOrderStatuses().Select(x => new OrderStatusWrapper(x))); SaveCommand = new DelegateCommand(OnAdd); CancelCommand = new DelegateCommand(OnCancel); }
public MapLauncher(IMessageDialogService messageDialogService) { _messageDialogService = messageDialogService; }
public CoreServices() { this.restService = (IRestService) new RestService(); this.messageDialogService = (IMessageDialogService) new MessageDialogService(); this.ImageUploadingServices = new ObservableCollection<IImageUploadService>(); }