public SingletonDatabaseInstallationService( IApplicationInstallationService applicationInstallationService, IVersionCheckService versionCheckService, ITimeService timeService, ILogger logger) { this.applicationInstallationService = applicationInstallationService; this.versionCheckService = versionCheckService; this.timeService = timeService; this.logger = logger; }
public MinimumClientVersionFilter(IVersionCheckService versionCheckHelper) { _versionCheckHelper = versionCheckHelper; }
public VersionController(IVersionCheckService versionCheckService) { _versionCheckService = versionCheckService; }
public MainViewModel( ISettingsService settingsService, ITemperatureService temperatureService, IWindowService windowService, IHotkeyService hotkeyService, IGeoService geoService, IVersionCheckService versionCheckService) { // Services SettingsService = settingsService; _temperatureService = temperatureService; _windowService = windowService; _hotkeyService = hotkeyService; _geoService = geoService; _versionCheckService = versionCheckService; _temperatureService.Tick += TemperatureServiceTick; _temperatureService.Updated += TemperatureServiceUpdated; _windowService.FullScreenStateChanged += WindowServiceFullScreenStateChanged; // Timers _checkForUpdatesTimer = new Timer(); _checkForUpdatesTimer.Tick += async(sender, args) => await CheckForUpdatesAsync(); _internetSyncTimer = new SyncedTimer(); _internetSyncTimer.Tick += async(sender, args) => await SynchronizeWithInternetAsync(); _disableTemporarilyTimer = new Timer(); _disableTemporarilyTimer.Tick += (sender, args) => { IsEnabled = true; _disableTemporarilyTimer.IsEnabled = false; }; // Commands ShowMainWindowCommand = new RelayCommand(() => { DispatcherHelper.CheckBeginInvokeOnUI(() => { Application.Current.MainWindow.Show(); Application.Current.MainWindow.Activate(); Application.Current.MainWindow.Focus(); }); }); ExitApplicationCommand = new RelayCommand(() => { Application.Current.ShutdownSafe(); }); AboutCommand = new RelayCommand(() => { Process.Start("https://github.com/Tyrrrz/LightBulb"); }); ToggleEnabledCommand = new RelayCommand(() => { IsEnabled = !IsEnabled; }); DisableTemporarilyCommand = new RelayCommand <double>(ms => { _disableTemporarilyTimer.IsEnabled = false; _disableTemporarilyTimer.Interval = TimeSpan.FromMilliseconds(ms); IsEnabled = false; _disableTemporarilyTimer.IsEnabled = true; }); DownloadNewVersionCommand = new RelayCommand(() => { Process.Start("https://github.com/Tyrrrz/LightBulb/releases"); }); // Settings SettingsService.PropertyChanged += SettingsServicePropertyChanged; UpdateConfiguration(); UpdateHotkeys(); // Init CheckForUpdatesAsync().Forget(); SynchronizeWithInternetAsync().Forget(); IsEnabled = true; }