Fixed effects not realising they are active in the UI

This commit is contained in:
SpoinkyNL committed 2016-08-26 10:20:12 +02:00
1 parent 821726d376
commit 3256666f79
3 files changed
+20 -7

No files matched your search

+5 -1
View File
@@ -97,9 +97,13 @@ namespace Artemis.Settings
else
mgr.RemoveShortcutsForExecutable("Artemis.exe", ShortcutLocation.Startup);
}
catch (FileNotFoundException)
{
// Ignored, only happens when running from VS
}
catch (DirectoryNotFoundException)
{
// ignored, this'll only occur if Artemis isn't installed (ran from VS)
// Ignored, only happens when running from VS
}
}
+9 -6
View File
@@ -24,19 +24,22 @@ namespace Artemis.Utilities
/// </summary>
public static async void UpdateApp()
{
// Only update if the user allows it
if (SettingsProvider.Load<GeneralSettings>().AutoUpdate)
return;
var settings = SettingsProvider.Load<GeneralSettings>();
Logger.Info("Update check enabled: {0}", settings.AutoUpdate);
Logger.Info("Checking for updates...");
// Only update if the user allows it
if (!SettingsProvider.Load<GeneralSettings>().AutoUpdate)
return;
// Pre-release
using (var mgr = UpdateManager.GitHubUpdateManager("https://github.com/SpoinkyNL/Artemis", null, null, null, true))
// using (var mgr = UpdateManager.GitHubUpdateManager("https://github.com/SpoinkyNL/Artemis", null, null, null, true))
// Release
// using (var mgr = UpdateManager.GitHubUpdateManager("https://github.com/SpoinkyNL/Artemis"))
using (var mgr = UpdateManager.GitHubUpdateManager("https://github.com/SpoinkyNL/Artemis"))
{
try
{
await mgr.Result.UpdateApp();
Logger.Info("Update check complete");
mgr.Result.Dispose();
}
catch (Exception e)
@@ -24,6 +24,7 @@ namespace Artemis.ViewModels.Abstract
EffectSettings = effectModel.Settings;
MainManager.OnEnabledChangedEvent += MainManagerOnOnEnabledChangedEvent;
MainManager.EffectManager.OnEffectChangedEvent += EffectManagerOnOnEffectChangedEvent;
}
private void MainManagerOnOnEnabledChangedEvent(object sender, EnabledChangedEventArgs e)
@@ -31,6 +32,11 @@ namespace Artemis.ViewModels.Abstract
NotifyOfPropertyChange(() => EffectEnabled);
}
private void EffectManagerOnOnEffectChangedEvent(object sender, EffectChangedEventArgs e)
{
NotifyOfPropertyChange(() => EffectEnabled);
}
[Inject]
public MetroDialogService DialogService { get; set; }