Ejemplo n.º 1
0
        public AboutViewModel(IContainer container)
        {
            _controller        = container.Resolve <AboutController>();
            _autoUpdateService = container.Resolve <IAutoUpdateService>();

            OpenUrlCommand.Subscribe(OnOpenUrl);
        }
Ejemplo n.º 2
0
 public HangfireStartupServiceConfigurationTask(
     DatabaseSettings databaseSettings,
     IAutoUpdateService autoUpdateService
     )
 {
     _databaseSettings  = databaseSettings;
     _autoUpdateService = autoUpdateService;
 }
        public MainWindowViewModel(IContainer container)
        {
            _container              = container;
            _eventRegistry          = container.Resolve <ApplicationEventRegistry>();
            _navigationService      = container.Resolve <INavigationService>();
            _autoUpdateService      = container.Resolve <IAutoUpdateService>();
            _profileSettingsService = container.Resolve <IProfileSettingsService>();
            _settingsService        = container.Resolve <ISettingsService>();

            _profileSettingsService.SelectedProfileChanged += OnSelectedProfileChanged;
            _profileSettingsService.ProfilesChanged        += OnProfilesChanged;

            var pluginNavigationSite = container.Resolve <IPluginNavigationSite>();

            ShowPluginCommand.Subscribe(OnShowPlugin);

            pluginNavigationSite.PluginRegistered += OnPluginRegistered;

            var files =
                new List <string>(
                    Directory.GetFiles(ApplicationPaths.WallpaperPath)
                    .Where(s => string.IsNullOrEmpty(_supportedExtensions) || _supportedExtensions.Contains(Path.GetExtension(s))));

            if (files.Count == 0)
            {
                files.AddRange(
                    Directory.GetFiles(
                        Path.Combine(ApplicationPaths.ApplicationPath, "Resources", "Images", "Wallpaper"))
                    .Where(s => string.IsNullOrEmpty(_supportedExtensions) || _supportedExtensions.Contains(Path.GetExtension(s))));
            }

            var rand = new Random();

            while (files.Count > 0)
            {
                var index = rand.Next(files.Count);
                var file  = files[index];
                files.RemoveAt(index);
                _images.Add(file);
            }

            if (_images.Count > 0)
            {
                _slideShowTimer.Interval = TimeSpan.FromMinutes(1);
                _slideShowTimer.Tick    += _timer_Tick;
                _slideShowTimer.Start();

                NextImage();
            }

            SelectProfileCommand.Subscribe(OnSelectProfile);

            _autoUpdateCheckTimer.Interval = TimeSpan.FromMinutes(30);
            _autoUpdateCheckTimer.Tick    += _autoUpdateCheckTimer_Tick;
            _autoUpdateCheckTimer.Start();

            UpdateProfiles();
        }
Ejemplo n.º 4
0
 public GetGeneralSiteSettingsQueryHandler(
     SettingQueryHelper getSettingQueryHelper,
     IAutoUpdateService autoUpdateService,
     IInternalSettingsRepository internalSettingsRepository
     )
 {
     _getSettingQueryHelper      = getSettingQueryHelper;
     _autoUpdateService          = autoUpdateService;
     _internalSettingsRepository = internalSettingsRepository;
 }
Ejemplo n.º 5
0
 public UpdateGeneralSiteSettingsCommandHandler(
     CofoundryDbContext dbContext,
     SettingCommandHelper settingCommandHelper,
     ISettingCache settingCache,
     IAutoUpdateService autoUpdateService
     )
 {
     _settingCommandHelper = settingCommandHelper;
     _dbContext            = dbContext;
     _settingCache         = settingCache;
     _autoUpdateService    = autoUpdateService;
 }
 public UpdateGeneralSiteSettingsCommandHandler(
     CofoundryDbContext dbContext,
     SettingCommandHelper settingCommandHelper,
     ISettingCache settingCache,
     IAutoUpdateService autoUpdateService,
     ITransactionScopeManager transactionScopeFactory
     )
 {
     _settingCommandHelper    = settingCommandHelper;
     _dbContext               = dbContext;
     _settingCache            = settingCache;
     _autoUpdateService       = autoUpdateService;
     _transactionScopeFactory = transactionScopeFactory;
 }
Ejemplo n.º 7
0
 public DataUploaderService(IAutoUpdateService autoUpdateService, HighWaterMarkQueryService highWaterMarkQueryService)
 {
     _autoUpdate = autoUpdateService;
     _highWaterMarkQueryService = highWaterMarkQueryService;
 }