Esempio n. 1
0
 private void InitUpdateChecker()
 {
     WindowsAPIAdapter.HotKeyPressed += HandleHotkeyPress;
     var updateChecker =
         new IntervalUpdateChecker(
             new Uri("https://api.github.com/repos/Belphemur/SoundSwitch/releases/latest"),
             AppConfigs.Configuration.UpdateCheckInterval);
     updateChecker.UpdateAvailable += (sender, @event) => NewVersionReleased?.Invoke(this, @event);
     updateChecker.CheckForUpdate();
 }
Esempio n. 2
0
 private void InitUpdateChecker()
 {
     WindowsAPIAdapter.HotKeyPressed += HandleHotkeyPress;
     #if DEBUG
     const string url = "https://www.aaflalo.me/api.json";
     #else
     const string url = "https://api.github.com/repos/Belphemur/SoundSwitch/releases";
     #endif
     _updateChecker = new IntervalUpdateChecker(
        new Uri(url),
        AppConfigs.Configuration.UpdateCheckInterval, AppConfigs.Configuration.SubscribedBetaVersion);
     _updateChecker.UpdateAvailable += (sender, @event) => NewVersionReleased?.Invoke(this,
         new NewReleaseAvailableEvent(@event.Release, AppConfigs.Configuration.UpdateState));
     _updateChecker.CheckForUpdate();
 }