public UserPreferencesService( ILocalSettingsService applicationSettingsService) { LocalSettings = applicationSettingsService; Load(); }
public MainWindowVM() { Router = new RoutingState(); //this.Router.Navigate.Execute(new MainMenuVM(this)); //return; ConfigService = Locator.Current.GetService <ILocalSettingsService>(); Init(); }
public WelcomePageViewModel( INavigationService navigationService, ILocationService locationService, ILocalSettingsService localSettingsService, IDialogService dialogService) : base(navigationService) { _locationService = locationService; _localSettingsService = localSettingsService; _dialogService = dialogService; UseCurrentLocationCommand = new Command(UseCurrentLocationCommandHandler); AddLocationCommand = new Command(AddLocationCommandHandler); }
public CinemaService( ILocalSettingsService applicationSettingsService, IApiClient apiClient, ICachingService <List <Cinema> > cinemaCache, ILocalStorageService storageService) { _applicationSettingsService = applicationSettingsService; _apiClient = apiClient; _cinemaCache = cinemaCache; _storageService = storageService; _cinemaCache.Initialise(LoadCinemasFromFileOrApi); LoadCinema(); }
public EntryOperations( ICompositionFactory compositionFactory, IBackendServiceClient storage, IEventAggregator eventAggregator, IStatusBusyService statusBusyService, Lazy<ITranslationService> translator, ILocalSettingsService settingsService, ITelemetryService telemetry) { this.compositionFactory = compositionFactory; this.storage = storage; this.eventAggregator = eventAggregator; this.statusBusyService = statusBusyService; this.translator = translator; this.settingsService = settingsService; this.telemetry = telemetry; }
public MainViewModel( ICompositionFactory compositionFactory, IBackendServiceClient storage, IEventAggregator eventAggregator, IStatusBusyService statusBusyService, IEntryOperations entryOperations, ILocalSettingsService localSettingsService, IStringResourceManager stringResourceManager, ILogSharingService logSharingService) : this() { Guard.NotNull(compositionFactory, nameof(compositionFactory)); Guard.NotNull(storage, nameof(storage)); Guard.NotNull(eventAggregator, nameof(eventAggregator)); Guard.NotNull(statusBusyService, nameof(statusBusyService)); Guard.NotNull(entryOperations, nameof(entryOperations)); Guard.NotNull(localSettingsService, nameof(localSettingsService)); Guard.NotNull(stringResourceManager, nameof(stringResourceManager)); Guard.NotNull(logSharingService, nameof(logSharingService)); this.storage = storage; this.eventAggregator = eventAggregator; this.statusBusyService = statusBusyService; this.entryOperations = entryOperations; this.localSettingsService = localSettingsService; this.stringResourceManager = stringResourceManager; this.logSharingService = logSharingService; CompositionFactory = compositionFactory; FullEntryListViewModel = compositionFactory.Create<FullEntryListViewModel>(); RandomEntryListViewModel = compositionFactory.Create<RandomEntryListViewModel>(); EntryTextEditorViewModel = compositionFactory.Create<EntryTextEditorViewModel>(); eventAggregator.GetEvent<EntryEditingFinishedEvent>().Subscribe(OnEntryEditingFinished); eventAggregator.GetEvent<EntryEditingCancelledEvent>().Subscribe(OnEntryEditingCancelled); eventAggregator.GetEvent<EntryDeletedEvent>().Subscribe(OnEntryDeleted); eventAggregator.GetEvent<EntryIsLearntChangedEvent>().Subscribe(OnEntryIsLearntChanged); eventAggregator.GetEvent<EntryUpdatedEvent>().SubscribeWithAsync(OnEntryDefinitionChangedAsync); eventAggregator.GetEvent<EntryDetailsRequestedEvent>().Subscribe(OnEntryDetailsRequested); eventAggregator.GetEvent<EntryQuickEditRequestedEvent>().Subscribe(OnEntryQuickEditRequested); }
public MicrosoftAccessTokenProvider([NotNull] ILocalSettingsService localSettingsService) { Guard.NotNull(localSettingsService, nameof(localSettingsService)); this.localSettingsService = localSettingsService; }