public SearchViewModel( IRegexService regexService, IResourceProvider resourceProvider, IApplicationDispatcher applicationDispatcher, SearchViewModelConfiguration searchViewModelConfiguration) { _regexService = regexService; _applicationDispatcher = applicationDispatcher; ToggleSearchCommand = ReactiveCommand.Create(ToggleSearch); Reset(); this.ValidationRule( vm => vm.SearchText, this.WhenAnyValue(x => x.IsRegexSearchEnabled, x => x.SearchText), v => !HasText || IsValid, _ => resourceProvider.GetResourceByName(searchViewModelConfiguration.InvalidRegexResourceName) ); this.WhenAnyValue( x => x.SearchText, x => x.IsSearchEnabled, x => x.IsRegexSearchEnabled, x => x.IsSearchCaseSensitive, x => x.IsRecursiveSearchEnabled) .Throttle(TimeSpan.FromMilliseconds(searchViewModelConfiguration.TimeoutMs)) .Subscribe(_ => FireSettingsChangedEvent()); }
public DirectoryInformationDialogViewModel( IDirectoryService directoryService, IApplicationDispatcher applicationDispatcher, IMainNodeInfoTabViewModel mainNodeInfoTabViewModel) { _directoryService = directoryService; _applicationDispatcher = applicationDispatcher; MainNodeInfoTabViewModel = mainNodeInfoTabViewModel; }
public DrivesListViewModel( IDriveService driveService, IDriveViewModelFactory driveViewModelFactory, IApplicationDispatcher applicationDispatcher) { _driveService = driveService; _driveViewModelFactory = driveViewModelFactory; _applicationDispatcher = applicationDispatcher; _drives = new ObservableCollection <IDriveViewModel>(); SubscribeToEvents(); ReloadDrives(); }
public NotifyPropertyChangedViewModel(IEventAggregator eventAggregator, IApplicationDispatcher dispatcher) { if (eventAggregator == null) { throw new ArgumentNullException("EventAggregator is null"); } if (dispatcher == null) { throw new ArgumentNullException("ApplicationDispatcher is null"); } this.EventAggregator = eventAggregator; this.Dispatcher = dispatcher; }
public OperationsStatesListViewModel( IOperationsStateService operationsStateService, IOperationStateViewModelFactory operationStateViewModelFactory, IApplicationDispatcher applicationDispatcher, IDialogService dialogService, OperationsStatesConfiguration configuration) { _operationsStateService = operationsStateService; _operationStateViewModelFactory = operationStateViewModelFactory; _applicationDispatcher = applicationDispatcher; _dialogService = dialogService; _activeOperations = new ObservableCollection <IOperationStateViewModel>(); _finishedOperationsQueue = new LimitedSizeStack <IOperationStateViewModel>(configuration.MaximumFinishedOperationsCount); _operationsViewModelsDictionary = new ConcurrentDictionary <IOperation, IOperationStateViewModel>(); SubscribeToEvents(); }
public SearchViewModel( IRegexService regexService, IResourceProvider resourceProvider, IApplicationDispatcher applicationDispatcher, SearchViewModelConfiguration searchViewModelConfiguration) { _regexService = regexService; _applicationDispatcher = applicationDispatcher; Reset(); this.ValidationRule(this.WhenAnyValue(x => x.IsRegexSearchEnabled, x => x.SearchText).Select(_ => IsValid), resourceProvider.GetResourceByName(searchViewModelConfiguration.InvalidRegexResourceName)); this.WhenAnyValue(x => x.SearchText, x => x.IsSearchEnabled, x => x.IsRegexSearchEnabled, x => x.IsSearchCaseSensitive) .Throttle(TimeSpan.FromMilliseconds(searchViewModelConfiguration.TimeoutMs)) .Subscribe(_ => FireSettingsChangedEvent()); }
public DrivesListViewModel( IMountedDriveService mountedDriveService, IUnmountedDriveService unmountedDriveService, IDrivesUpdateService drivesUpdateService, IDriveViewModelFactory driveViewModelFactory, IApplicationDispatcher applicationDispatcher) { _mountedDriveService = mountedDriveService; _unmountedDriveService = unmountedDriveService; _driveViewModelFactory = driveViewModelFactory; _applicationDispatcher = applicationDispatcher; _mountedDrivesDictionary = new Dictionary <DriveModel, IDriveViewModel>(); _unmountedDrivesDictionary = new Dictionary <UnmountedDriveModel, IDriveViewModel>(); SubscribeToEvents(); LoadDrives(); drivesUpdateService.Start(); }
public DialogService(IApplicationDispatcher applicationDispatcher, IMainWindowProvider mainWindowProvider, IClipboardService clipboardService) { _applicationDispatcher = applicationDispatcher; _mainWindowProvider = mainWindowProvider; _clipboardService = clipboardService; }
public AppsService(IAppRepository appRepository, AppService appService, IApplicationDispatcher dispatcher) { this.dispatcher = dispatcher; this.appRepository = appRepository; this.appService = appService; }
public HomePageViewModel(IEventAggregator eventAggregator, IApplicationDispatcher dispatcher, IRepositoryFactory repositoryFactory, IEntityFactory entityFactory) : base(eventAggregator, dispatcher) { this.RepositoryFactory = repositoryFactory; this.EntityFactory = entityFactory; this.SubscribeToEvents(); this.GetNotesAsync(); }