#pragma warning disable 4014 public SettingsRepository(IStorageService storageService, ISqliteService sqliteService, IPlatformCodeService platformCodeService) { _storageService = storageService; _sqliteService = sqliteService; _platformCodeService = platformCodeService; Initialize(); }
public SettingsPageViewModel(ISettingsRepository settingsRepository, IArticleRepository articleRepository, IPlatformCodeService platformCodeService, IPermissionsService permissionsService) { _settingsRepository = settingsRepository; _articleRepository = articleRepository; _platformCodeService = platformCodeService; _permissionsService = permissionsService; Sources = _articleRepository.GetAllSources(); Settings = _settingsRepository.GetEditSettings(); foreach (var baseSettingModel in Settings) { baseSettingModel.PropertyChanged += BaseSettingModelOnPropertyChanged; } _saveCommand = new LoadingRelayCommand(Save, () => _anythingChanged, true); _switchFeedStatusCommand = new LoadingRelayCommand <FeedModel>(SwitchFeedStatus, f => true, true); _switchSourceStatusCommand = new LoadingRelayCommand <SourceModel>(SwitchSourceStatus, f => true, true); _resetApplicationCommand = new LoadingRelayCommand(ResetApplication, () => true, true); if (!IsInDesignMode) { InitializeSettingsAsync(); } }
public ImageDownloadService(IPlatformCodeService platformCodeService, ISqliteService sqliteService, IPermissionsService permissionsService, IProgressService progressService) { _platformCodeService = platformCodeService; _permissionsService = permissionsService; _progressService = progressService; _maxHeight = _platformCodeService.DeviceHeight(); _maxWidth = _platformCodeService.DeviceWidth(); _genericRepository = new GenericRepository<ImageContentModel, ImageContentEntity>(sqliteService); }
public ImageDownloadService(IPlatformCodeService platformCodeService, ISqliteService sqliteService, IPermissionsService permissionsService, IProgressService progressService) { _platformCodeService = platformCodeService; _permissionsService = permissionsService; _progressService = progressService; _maxHeight = _platformCodeService.DeviceHeight(); _maxWidth = _platformCodeService.DeviceWidth(); _genericRepository = new GenericRepository <ImageContentModel, ImageContentEntity>(sqliteService); }
public SettingsPageViewModel(ISettingsRepository settingsRepository, IArticleRepository articleRepository, IPlatformCodeService platformCodeService, IPermissionsService permissionsService) { _settingsRepository = settingsRepository; _articleRepository = articleRepository; _platformCodeService = platformCodeService; _permissionsService = permissionsService; Sources = _articleRepository.GetAllSources(); Settings = _settingsRepository.GetEditSettings(); foreach (var baseSettingModel in Settings) baseSettingModel.PropertyChanged += BaseSettingModelOnPropertyChanged; _saveCommand = new LoadingRelayCommand(Save, () => _anythingChanged, true); _switchFeedStatusCommand = new LoadingRelayCommand<FeedModel>(SwitchFeedStatus, f => true, true); _switchSourceStatusCommand = new LoadingRelayCommand<SourceModel>(SwitchSourceStatus, f => true, true); _resetApplicationCommand = new LoadingRelayCommand(ResetApplication, () => true, true); if (!IsInDesignMode) InitializeSettingsAsync(); }
public ArticlePageViewModel(ISettingsRepository settingsRepository, IArticleRepository articleRepository, IPlatformCodeService platformCodeService) { _settingsRepository = settingsRepository; _articleRepository = articleRepository; _platformCodeService = platformCodeService; _setDisplayState = new RelayCommand <DisplayState>(SetDisplayState); _makeFontBiggerCommand = new RelayCommand(MakeFontBigger, () => CanMakeFontBigger); _makeFontSmallerCommand = new RelayCommand(MakeFontSmaller, () => CanMakeFontSmaller); _favoriteCommand = new RelayCommand(Favorite); _openInBrowserCommand = new RelayCommand(OpenInBrowser, () => CanOpenInBrowser); _shareCommand = new RelayCommand(Share); _reloadArticleCommand = new RelayCommand(ReloadArticle, () => CanReloadArticle); _goToStartCommand = new RelayCommand(GoToStart, () => CanGoToStart); _goLeftCommand = new RelayCommand(GoLeft, () => CanGoLeft); _goRightCommand = new RelayCommand(GoRight, () => CanGoRight); _startCommand = new RelayCommand(Start, () => CanStart); _increaseSpeedCommand = new RelayCommand(IncreaseSpeed, () => CanIncreaseSpeed); _decreaseSpeedCommand = new RelayCommand(DecreaseSpeed, () => CanDecreaseSpeed); _chooseFontCommand = new RelayCommand <string>(ChooseFont, CanChooseFont); if (IsInDesignMode) { FontSize = 20; ReadingSpeed = 300; SelectArticle(_articleRepository.GetInfoArticle()); } else { Initialize(); } }
public ArticlePageViewModel(ISettingsRepository settingsRepository, IArticleRepository articleRepository, IPlatformCodeService platformCodeService) { _settingsRepository = settingsRepository; _articleRepository = articleRepository; _platformCodeService = platformCodeService; _setDisplayState = new RelayCommand<DisplayState>(SetDisplayState); _makeFontBiggerCommand = new RelayCommand(MakeFontBigger, () => CanMakeFontBigger); _makeFontSmallerCommand = new RelayCommand(MakeFontSmaller, () => CanMakeFontSmaller); _favoriteCommand = new RelayCommand(Favorite); _openInBrowserCommand = new RelayCommand(OpenInBrowser, () => CanOpenInBrowser); _shareCommand = new RelayCommand(Share); _reloadArticleCommand = new RelayCommand(ReloadArticle, () => CanReloadArticle); _goToStartCommand = new RelayCommand(GoToStart, () => CanGoToStart); _goLeftCommand = new RelayCommand(GoLeft, () => CanGoLeft); _goRightCommand = new RelayCommand(GoRight, () => CanGoRight); _startCommand = new RelayCommand(Start, () => CanStart); _increaseSpeedCommand = new RelayCommand(IncreaseSpeed, () => CanIncreaseSpeed); _decreaseSpeedCommand = new RelayCommand(DecreaseSpeed, () => CanDecreaseSpeed); _chooseFontCommand = new RelayCommand<string>(ChooseFont, CanChooseFont); if (IsInDesignMode) { FontSize = 20; ReadingSpeed = 300; SelectArticle(_articleRepository.GetInfoArticle()); } else { Initialize(); } }
public PermissionService(IPlatformCodeService platformCodeService, IDialogService dialogService) { _platformCodeService = platformCodeService; _dialogService = dialogService; }