コード例 #1
0
        private void CleanStates()
        {
            if (_fallbackStates == null)
            {
                return;
            }
            // Clear event handlers when switching tags.
            foreach (var state in _fallbackStates)
            {
                switch (state)
                {
                case "album":
                    if (_albumChangedHandlerAdded)
                    {
                        ThumbnailManager.RemoveHandler(_tag.ArtistName, _tag.AlbumName, OnAlbumImageChanged);
                        _albumChangedHandlerAdded = false;
                    }
                    break;

                case "artist":
                    if (_artistChangedHandlerAdded)
                    {
                        ThumbnailManager.RemoveHandler(_tag.ArtistName, OnArtistImageChanged);
                        _artistChangedHandlerAdded = false;
                    }
                    break;
                }
            }
            _currentFallbackStage = -1;
        }