/// <summary> /// Handles the exit of the app. /// </summary> private void AppExit(object sender, ExitEventArgs e) { RichPresenceHelper.Dispose(); TaskbarIconHelper.Dispose(); SettingsHelper.SetStartupSettings(); SettingsHelper.SaveTheme(); }
private async void DataUpdated(object sender, TickerEventArgs e) { TaskbarIconHelper.SetPrice(e.LastPrice, e.PreviousPrice, e.Coin, e.Currency, e.Provider, e.LastUpdated); // when changing providers, coin and currency might change and we need to reflect that in UI contextMenuControl.SetCoin(e.Coin); contextMenuControl.SetCurrency(e.Currency); await CheckForUpdates(); }
/// <summary> /// Handles the startup of the app. /// </summary> private void AppStart(object sender, StartupEventArgs e) { RichPresenceHelper.Initialize(DiscordPresenceUI.Properties.Settings.Default.AppId); RichPresenceHelper.UpdateFromSettings(); SettingsHelper.SetLocale(); SettingsHelper.CheckForInstances(); SettingsHelper.SetStartupSettings(); SettingsHelper.SetTheme(); TaskbarIconHelper.InitializeTaskbarIcon(); }
public void SaveProjects() { File.WriteAllText(Settings, JsonConvert.SerializeObject((Servers, Projects), _settings)); TaskbarIconHelper.UpdateContextMenu(); }