Пример #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="preferenceService"></param>
 /// <param name="configuration"></param>
 /// <param name="logger"></param>
 public UserPreferenceV1Controller(IPreferenceService preferenceService, IConfiguration configuration,
                                   ILogger logger)
 {
     this.configuration = configuration;
     this.logger        = logger;
     _preferenceService = preferenceService;
 }
Пример #2
0
        // TODO: Refactor dependency mess
        public SoundGeneratorViewModel(ISessionContextService sessionContext,
                                       IDialogService dialogService,
                                       IFoldersExplorerFactory <SoundEvent, Sound> factory,
                                       IPreferenceService preferenceService,
                                       ISoundJsonUpdaterFactory jsonUpdaterFactory,
                                       IEditorFormFactory <Sound> editorFormFactory,
                                       IUniqueValidator <SoundEvent> soundEventValidator,
                                       ICodeGenerationService codeGenerationService)
            : base(sessionContext, dialogService, factory)
        {
            Preferences = preferenceService.GetOrCreate <SoundsGeneratorPreferences>();

            PreferenceService     = preferenceService;
            JsonUpdaterFactory    = jsonUpdaterFactory;
            SoundEventValidator   = soundEventValidator;
            CodeGenerationService = codeGenerationService;

            Explorer.AllowFileExtensions(".ogg");
            Explorer.OpenFileDialog.Filter                = "Sound file (*.ogg) | *.ogg";
            Explorer.OpenFileDialog.Multiselect           = true;
            Explorer.OpenFileDialog.CheckFileExists       = true;
            Explorer.OpenFileDialog.ValidateNames         = true;
            Explorer.OpenFolderDialog.ShowNewFolderButton = true;

            FileEditor             = editorFormFactory.Create();
            FileEditor.ItemEdited += OnSoundEdited;
        }
Пример #3
0
 public StopListViewModel(
     ILoggerService loggerService,
     IPreferenceService preferenceService,
     IUserInteractionService userInteractionService)
     : base(loggerService, preferenceService, userInteractionService)
 {
 }
 public AdminAPIController(IAdminService _HomeService, IManageAdminService manageAdminService, IPreferenceService prefenceService, IUserService userService)
 {
     _adminService       = _HomeService;
     _manageAdminService = manageAdminService;
     _prefenceService    = prefenceService;
     _userService        = userService;
 }
Пример #5
0
 public CustomEasyCardClick()
 {
     InitializeComponent();
     PreferenceServie = Locator.Instance.Resolve <IPreferenceService>();
     IsChecked        = PreferenceServie.GetPreference(PreferenceKey.Dungeon_01_Tr_01, false);
     CheckPref(false);
 }
Пример #6
0
 public Startup(IPreferenceService preference,
                IFileService files,
                IRunNuget nuget)
 {
     _preference = preference;
     _files      = files;
     _nuget      = nuget;
 }
Пример #7
0
 public GoodReadsDataSource(IPreferenceService preferenceService)
 {
     _preferenceService = preferenceService;
     _client            = GoodreadsClient.Create(
         preferenceService.Get("goodreads.apikey", "ckvsiSDsuqh7omh74ZZ6Q"), // todo: this is the lazylibrarian key...
         preferenceService.Get("goodreads.apisecret", "")
         );
 }
 public PowerLogControlViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IPowerLogService powerLog, IPreferenceService preference) :
     base(regionManager)
 {
     EventAggregator = eventAggregator;
     EventAggregator.GetEvent <DateChangedEvent>().Subscribe(OnDateChanged, ThreadOption.UIThread).AddTo(Disposable);
     PowerLogService   = powerLog;
     PreferenceService = preference;
 }
Пример #9
0
 public TransmissionDownloadClient(IPreferenceService preferencesService)
 {
     _preferencesService = preferencesService;
     _client             = new Client(
         preferencesService.Get("transmission.host", "127.0.0.1"), null,
         preferencesService.Get("transmission.username", "transmission"),
         preferencesService.Get("transmission.password", "transmission"));
 }
Пример #10
0
 public MySqlMembreService(String connexion)
 {
     stringConnexion = connexion;
     restrictionAlimentaireService = new MySqlRestrictionAlimentaireService();
     objectifService = new MySqlObjectifService();
     preferenceService = new MySqlPreferenceService();
     menuService = new MySqlMenuService();
 }
Пример #11
0
 public MySqlMembreService(String connexion)
 {
     stringConnexion = connexion;
     restrictionAlimentaireService = new MySqlRestrictionAlimentaireService();
     objectifService   = new MySqlObjectifService();
     preferenceService = new MySqlPreferenceService();
     menuService       = new MySqlMenuService();
 }
Пример #12
0
 public SabnzbdDownloadClient(IPreferenceService preferencesService)
 {
     _preferencesService = preferencesService;
     _category           = preferencesService.Get("sabnzbd.category", "audiobooks");
     _client             = new SabClient(
         preferencesService.Get("sabnzbd.host", "127.0.0.1"),
         preferencesService.Get("sabnzbd.port", (ushort)8080),
         preferencesService.Get("sabnzbd.apikey", ""));
 }
Пример #13
0
 public GetPreferences(IMapperProvider mapperProvider, IEncryptionProvider encryptionProvider,
                       ICrmCacheProvider crmCacheProvider, ICategoryService categoryService,
                       IPreferenceService preferenceService)
     : base(mapperProvider, encryptionProvider)
 {
     _crmCacheProvider  = crmCacheProvider;
     _categoryService   = categoryService;
     _preferenceService = preferenceService;
 }
 public SaveCustomerPreferences(IMapperProvider mapperProvider, IEncryptionProvider encryptionProvider,
                                ICustomerPreferenceService customerPreferenceService,
                                IPreferenceService preferenceService, ICrmCacheProvider cacheProvider)
     : base(mapperProvider, encryptionProvider)
 {
     _customerPreferenceService = customerPreferenceService;
     _cacheProvider             = cacheProvider;
     _preferenceService         = preferenceService;
 }
Пример #15
0
 public EntryViewModel(
     [NotNull] IPreferenceService preferenceService
     , [NotNull] IDeviceAction deviceAction
     )
 {
     Guard.ThrowIfNull(preferenceService, nameof(preferenceService));
     this.preferenceService = preferenceService;
     this.deviceAction      = deviceAction;
     Initialize();
 }
Пример #16
0
 public CrmCacheProvider(ICacheProvider cacheProvider,
                         IAttributeService attributeService,
                         ICategoryService categoryService,
                         IPreferenceService preferenceService)
 {
     _cacheProvider     = cacheProvider;
     _attributeService  = attributeService;
     _categoryService   = categoryService;
     _preferenceService = preferenceService;
 }
Пример #17
0
 private void ResolveDepedencies()
 {
     CurrentRequest.Resolver.AppName = "UEoffer-rew-pref.aspx";
     m_Offer            = CurrentRequest.Resolver.Resolve <IOffer>();
     m_Preference       = CurrentRequest.Resolver.Resolve <IPreferenceService>();
     m_PreferenceReward = CurrentRequest.Resolver.Resolve <IPreferenceRewardService>();
     m_ActivityLog      = CurrentRequest.Resolver.Resolve <IActivityLogService>();
     m_dbAccess         = CurrentRequest.Resolver.Resolve <CMS.DB.IDBAccess>();
     m_OAWService       = CurrentRequest.Resolver.Resolve <IOfferApprovalWorkflowService>();
 }
Пример #18
0
        private async Task InitData()
        {
            IPairDeviceService pairDeviceService = FactorySingleton.FactoryOffline.Get <PairDeviceService>();
            IMastersService    mastersService    = FactorySingleton.FactoryOffline.Get <MastersService>();
            IPreferenceService preferenceService = FactorySingleton.FactoryOffline.Get <PreferenceService>();
            await pairDeviceService.DeletePair();

            await mastersService.ClearMasterPair();

            await preferenceService.ClearPreference();
        }
Пример #19
0
 public DownloadManager(IPreferenceService preferencesService, IServiceProvider provider)
 {
     _provider  = provider;
     _random    = new Random();
     _downloads = new List <DownloadHandle>();
     _pollTimer = new Timer(
         ExecuteDownloadClientPoll,
         null,
         TimeSpan.Zero,
         TimeSpan.FromMinutes(preferencesService.Get("downloadmanager.pollmins", 2)));
 }
Пример #20
0
 public CalendarControlViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IPowerLogService powerLog, IPreferenceService preference) :
     base(regionManager)
 {
     EventAggregator = eventAggregator;
     Preference      = preference;
     PowerLogService = powerLog;
     DisplayDate     = powerLog.ScannedDate.ToReactiveProperty().AddTo(Disposable);
     SelectedDate.Subscribe(OnSelectedDateChanged);
     ScanCompleted = powerLog.ScanCompleted.ToReadOnlyReactivePropertySlim().AddTo(Disposable);
     ScanCompleted.Subscribe(OnScanCompletedChanged).AddTo(Disposable);
 }
Пример #21
0
        public SplashViewModel(
            IRepository <DeviceLocationModel> repository,
            INetworkingService networkingService,
            ILoggerService loggerService,
            IPreferenceService preferenceService,
            IUserInteractionService userInteractionService) : base(loggerService, preferenceService, userInteractionService)
        {
            _repository        = repository;
            _networkingService = networkingService;

            _timer = new Timer(TimeSpan.FromSeconds(6), CheckRepositoryIsInitializedAndNavigateToNextViewModel).Start();
        }
Пример #22
0
 public SoundGeneratorViewModel(ISessionContextService sessionContext, IDialogService dialogService, IFoldersExplorerFactory <SoundEvent, Sound> factory, IPreferenceService preferenceService) : base(sessionContext, dialogService, factory)
 {
     PreferenceService = preferenceService;
     Preferences       = preferenceService.GetOrCreate <SoundsGeneratorPreferences>();
     Explorer.AllowedFileExtensions.Add(".ogg");
     Explorer.OpenFileDialog.Filter                = "Sound file (*.ogg) | *.ogg";
     Explorer.OpenFileDialog.Multiselect           = true;
     Explorer.OpenFileDialog.CheckFileExists       = true;
     Explorer.OpenFileDialog.ValidateNames         = true;
     Explorer.OpenFolderDialog.ShowNewFolderButton = true;
     FileEditor             = new EditorForm <Sound>(Cache.Default, DialogService, new SoundEditForm());
     FileEditor.ItemEdited += OnSoundEdited;
 }
        public MainViewModel(
            IMvxNavigationService navigationService,
            IWeatherService weatherService,
            IProgressService progressService,
            ICacheService cacheService,
            IPreferenceService preferenceService)
        {
            _navigationService = navigationService;
            _weatherService    = weatherService;
            _progressService   = progressService;
            _cacheService      = cacheService;
            _preferenceService = preferenceService;

            GoButtonCommand = new MvxAsyncCommand(DoButtonCommand, CanDoGotButton);
        }
Пример #24
0
        public async Task TestSQLServicePreferenceService()
        {
            await InitData();

            IPreferenceService preferenceService = FactorySingleton.FactoryOffline.Get <PreferenceService>();

            Assert.IsNull(await preferenceService.GetPrefValue(PrefEnums.PinSecurityHash), "Error: preferenceService.GetPrefValue() not null after delete");
            string pinhash = pinhashDemo;
            bool   result  = await preferenceService.SavePrefValue(PrefEnums.PinSecurityHash, pinhash);

            Assert.IsTrue(result, "Error: preferenceService.SavePrefValue");
            Assert.IsNotNull(await preferenceService.GetPrefValue(PrefEnums.PinSecurityHash), "Error: preferenceService.GetPrefValue() null after save");
            pinhash = await preferenceService.GetPrefValue(PrefEnums.PinSecurityHash);

            Assert.AreEqual(pinhash, pinhashDemo, "Error - not equal after save and get!");
            await preferenceService.ClearPreference();
        }
Пример #25
0
 public PreferenceServiceTests()
 {
     configuration = Substitute.For <IConfiguration>();
     logger        = Substitute.For <ILogger>();
     transaction   = Substitute.For <ITransactions>();
     configuration["PreferenceKafkaTopicNames"] = "VSS.Interfaces.Events.Preference.IPreferenceEvent";
     configuration["TopicSuffix"] = "-Test";
     preferenceService            = new PreferenceService(configuration, logger, transaction);
     string[] topics = configuration["PreferenceKafkaTopicNames"].Split(',');
     transaction.Execute(Arg.Any <List <Action> >()).Returns(x =>
     {
         foreach (var action in x.Arg <List <Action> >())
         {
             action();
         }
         return(true);
     });
 }
Пример #26
0
 public ViewModelPreferences(IPreferenceService preference)
 {
     this.Preference          = preference;
     BsRootFolders            = new BindingSource();
     BsRootFolders.DataSource = new List <RootFolder>();
     BsIgnorePaths            = new BindingSource();
     BsIgnorePaths.DataSource = new List <ScanIgnorePath>();
     SqliteDBLocation         = Storage.SqliteDatabaseLocation;
     PropertyChanged         += async(s, e) => {
         if (e.PropertyName == nameof(FolderPath))
         {
             return;
         }
         else if (e.PropertyName == nameof(SqliteDBLocation))
         {
             return;
         }
     };
 }
Пример #27
0
        public DemoServiceLocatorMaster(UserContext context)
            : base(context)
        {
            userService   = new DemoUserService(this);
            schoolService = new DemoSchoolService(this);
            chalkableDepartmentService = new DemoChalkableDepartmentService(this);
            categoryService            = new DemoCategoryService(this);
            developerService           = new DemoDeveloperService(this);
            districtService            = new DemoDistrictService(this);
            emailService             = new DemoEmailService(this);
            backgroundTaskService    = new DemoBackgroundTaskService(this);
            applicationService       = new DemoApplicationService(this);
            applicationUploadService = new DemoApplicationUploadService(this);

            preferenceService         = new PreferenceService(this);
            personPictureService      = new PersonPictureService(this);
            departmentIconService     = new DepartmentIconService(this);
            applicationPictureService = new ApplicationPictureService(this);
            dbService           = new DbService(Context != null ? Context.MasterConnectionString : null);
            userTrackingService = new NullTrackingService();
        }
        public SettingsDialogViewModel(IPreferenceService preferenceService)
        {
            PreferenceService = preferenceService;
            var preference = PreferenceService.Preference;

            RoundingRuleIndex.Value = (int)preference.Rounding;
            RoundUnit.Value         = preference.RoundUnit;
            StartMargin.Value       = preference.StartMargin;
            EndMargin.Value         = preference.EndMargin;

            FirstDayIndex.Value = (int)preference.FirstDayOfWeek;

            DayOffset.Value = (int)preference.DayOffsetMinutes;
            DayOffset.Subscribe(OnDayOffsetChanged);

            MaxDays.Value = preference.MaxDays;
            MaxDays.Subscribe(OnMaxDaysChanged);

            EnableBlackoutDates.Value = preference.EnableBlackoutDates;
            EnableBlackoutDates.Subscribe(OnEnableBlackoutDatesChanged);

            OkCommand = new DelegateCommand(OnOkCommand);
        }
Пример #29
0
 public ServiceLocatorMaster(UserContext context) : base(context)
 {
     userService                     = new UserService(this);
     schoolService                   = new SchoolService(this);
     backgroundTaskService           = new BackgroundTaskService(this);
     preferenceService               = new PreferenceService(this);
     chalkableDepartmentService      = new ChalkableDepartmentService(this);
     personPictureService            = new PersonPictureService(this);
     departmentIconService           = new DepartmentIconService(this);
     customReportTemplateIconService = new CustomReportTemplateIconService(this);
     districtService                 = new DistrictService(this);
     applicationService              = new ApplicationService(this);
     categoryService                 = new CategoryService(this);
     applicationUploadService        = new ApplicationUploadService(this);
     EmailService                    = new EmailService(this);
     developerService                = new DeveloperService(this);
     applicationPictureService       = new ApplicationPictureService(this);
     DbService                   = new DbService(Context?.MasterConnectionString);
     userTrackingService         = new MixPanelService(Settings.MixPanelToken);
     dbMaintenanceService        = new DbMaintenanceService(this);
     academicBenchmarkService    = new AcademicBenchmarkService(this);
     customReportTemplateService = new CustomReportTemplateService(this);
 }
Пример #30
0
 public PreferencesController(IPreferenceService service)
 {
     this.service = service;
 }
Пример #31
0
 public PreferenceController(IPreferenceService service, IActorService actService)
 {
     this.preferenceService = service;
     this.actorService      = actService;
 }
 public PreferenceController(IPreferenceService service, IActorService actService)
 {
     this.preferenceService = service;
     this.actorService = actService;
 }