コード例 #1
0
        private void LoadSettings()
        {
            Settings.Load();

            switch (Globals.PlayerSelection)
            {
                case Globals.MediaPlayerSelection.Spotify:
                    this.ToggleSpotify();
                    break;

                case Globals.MediaPlayerSelection.iTunes:
                    this.ToggleiTunes();
                    break;

                case Globals.MediaPlayerSelection.Winamp:
                    this.ToggleWinamp();
                    break;

                case Globals.MediaPlayerSelection.foobar2000:
                    this.Togglefoobar2000();
                    break;

                case Globals.MediaPlayerSelection.VLC:
                    this.ToggleVLC();
                    break;

                case Globals.MediaPlayerSelection.GPMDP:
                    this.ToggleGPMDP();
                    break;

                case Globals.MediaPlayerSelection.quodlibet:
                    this.ToggleQuodlibet();
                    break;
            }

            this.toolStripMenuItemSaveSeparateFiles.Checked = Globals.SaveSeparateFiles;
            this.toolStripMenuItemSaveAlbumArtwork.Checked = Globals.SaveAlbumArtwork;
            this.toolStripMenuItemKeepSpotifyAlbumArtwork.Checked = Globals.KeepSpotifyAlbumArtwork;

            switch (Globals.ArtworkResolution)
            {
                case Globals.AlbumArtworkResolution.Tiny:
                    this.ToggleArtworkTiny();
                    break;

                case Globals.AlbumArtworkResolution.Small:
                    this.ToggleArtworkSmall();
                    break;

                case Globals.AlbumArtworkResolution.Medium:
                    this.ToggleArtworkMedium();
                    break;

                case Globals.AlbumArtworkResolution.Large:
                    this.ToggleArtworkLarge();
                    break;
            }

            this.toolStripMenuItemCacheSpotifyMetadata.Checked = Globals.CacheSpotifyMetadata;
            this.toolStripMenuItemSaveHistory.Checked = Globals.SaveHistory;
            this.toolStripMenuItemDisplayTrackPopup.Checked = Globals.DisplayTrackPopup;
            this.toolStripMenuItemEmptyFileIfNoTrackPlaying.Checked = Globals.EmptyFileIfNoTrackPlaying;
            this.toolStripMenuItemEnableHotkeys.Checked = Globals.EnableHotkeys;
        }
コード例 #2
0
 private void Snip_FormClosing(object sender, FormClosingEventArgs e)
 {
     // Save settings automatically when the form is being closed.
     Settings.Save();
 }