Beispiel #1
0
        private void DisableSong(object sender, RoutedEventArgs e)
        {
            var song = (Song)((MenuItem)sender).Tag;

            if (settings.DisabledSongs.Contains(song))
            {
                MessageBox.Show(
                    "既に非表示されています。", "osu! Player",
                    MessageBoxButton.OK, MessageBoxImage.Error
                    );
            }

            settings.DisabledSongs.Add(song);
            settings.Write();

            _songs.Remove(song);
        }
        private void EnableSong(object sender, RoutedEventArgs e)
        {
            var song = (Song)((MenuItem)sender).Tag;

            if (_settings.DisabledSongs.Contains(song))
            {
                IsModified = true;

                _settings.DisabledSongs.Remove(song);
                _settings.Write();

                _songs.Remove(song);
            }
            else
            {
                MessageBox.Show("この曲は既に復元されています。", "osu! Player", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }