Пример #1
0
 public MainViewModel(NavigationStore navigationStore, ModalNavigationStore modalNavigationStore)
 {
     _navigationStore      = navigationStore;
     _modalNavigationStore = modalNavigationStore;
     _navigationStore.CurrentViewModelChanged      += OnCurrentViewModelChanged;
     _modalNavigationStore.CurrentViewModelChanged += OnCurrentModalViewModelChanged;
 }
Пример #2
0
        public ReestrSettingViewModel(
            ModalNavigationStore modalNavigationStore,
            IBarrelStorageDataService barrelStorageDataService,
            IReestrSettingDataService reestrSettingDataService,
            IRecipeDataService recipeDataService,
            ICustomerDataService customerDataService)
        {
            _modalNavigationStore     = modalNavigationStore;
            _barrelStorageDataService = barrelStorageDataService;
            _reestrSettingDataService = reestrSettingDataService;
            _recipeDataService        = recipeDataService;
            _customerDataService      = customerDataService;

            this.WhenAnyValue(x => x.Password)
            .Throttle(TimeSpan.FromSeconds(1))
            .Where(x => !string.IsNullOrWhiteSpace(x))
            .ObserveOnDispatcher()
            .Subscribe(PasswordChecker);

            this.WhenAnyValue(x => x.SelectedRecipe)
            .Skip(1)
            .SelectMany(async(x) => await _barrelStorageDataService.GetLastBarrelNumber(x))
            .ObserveOnDispatcher()
            .Subscribe(number => ReestrSetting.InitialBarrelNumber = number + 1);

            Task.Run(Initialize);
            SubmitCommand = new DelegateCommand(ExecuteSubmitCommand);
            CancelCommand = new DelegateCommand(() => modalNavigationStore.Close());
        }
 public ReestrEditViewModel(ICustomerDataService customerDataService, ModalNavigationStore modalNavigationStore)
 {
     _customerDataService  = customerDataService;
     _modalNavigationStore = modalNavigationStore;
     SubmitCommand         = new DelegateCommand(ExecuteSubmitCommand);
     CancelCommand         = new DelegateCommand(() => modalNavigationStore.Close());
     Task.Run(Initialize);
 }
Пример #4
0
 public CloseModalNavigationService(ModalNavigationStore navigationStore)
 {
     _navigationStore = navigationStore;
 }
Пример #5
0
 public ModalNavigationService(ModalNavigationStore navigationStore, Func <TViewModel> createViewModel)
 {
     _navigationStore = navigationStore;
     _createViewModel = createViewModel;
 }
Пример #6
0
 public App()
 {
     _accountStore         = new AccountStore();
     _navigationStore      = new NavigationStore();
     _modalNavigationStore = new ModalNavigationStore();
 }
Пример #7
0
 public App()
 {
     _navigationStore      = new NavigationStore();
     _modalNavigationStore = new ModalNavigationStore();
 }