Ejemplo n.º 1
0
 /// <summary>
 /// Handles the exit of the app.
 /// </summary>
 private void AppExit(object sender, ExitEventArgs e)
 {
     RichPresenceHelper.Dispose();
     TaskbarIconHelper.Dispose();
     SettingsHelper.SetStartupSettings();
     SettingsHelper.SaveTheme();
 }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 /// <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();
 }
Ejemplo n.º 4
0
 public void SaveProjects()
 {
     File.WriteAllText(Settings, JsonConvert.SerializeObject((Servers, Projects), _settings));
     TaskbarIconHelper.UpdateContextMenu();
 }