示例#1
0
 private void Form1_FormClosing(Object sender, FormClosingEventArgs e)
 {
     Properties.Settings.Default.General_Volume     = PlayerForm.currentvolume;
     Properties.Settings.Default.General_LastUpdate = PlayerForm.lastUpdateCheck;
     Properties.Settings.Default.Save();
     if (Properties.Settings.Default.General_DiscordIntegration)
     {
         PlayerForm.DisposeRPC();
     }
     //Application.Exit();
     Task.Run(PlayerForm.ShutdownTheApp);
 }
示例#2
0
 public void ApplySettings()
 {
     if (Properties.Settings.Default.Appearance_DarkMode)
     {
         ThemeHandler.SetColors(this,
                                (44, 47, 51),
                                (255, 255, 255),
                                Color.Black,
                                Color.White);
     }
     else
     {
         ThemeHandler.SetColors(this, (Properties.Settings.Default.Appearance_AccentColorRed, Properties.Settings.Default.Appearance_AccentColorGreen, Properties.Settings.Default.Appearance_AccentColorBlue), (255, 255, 255), Color.White, Color.Black);
     }
     if (Properties.Settings.Default.General_DiscordIntegration)
     {
         PlayerForm.InitDiscordRPC();
     }
     else
     {
         PlayerForm.DisposeRPC();
     }
 }