private void MusicContainer_OnContextMenuClick(MusicNotifyChanged selectMusicAdd) { this.selectMusicAdd = selectMusicAdd; this.MenuAddPlaylist.Visibility = Visibility.Visible; this.MenuAddPlaylist.IsEnabled = true; this.MainGrid.IsEnabled = false; this.MainGrid.Opacity = 0.5; }
private void MusicContainer_OnDeleteClick(MusicNotifyChanged music) { if (this.SelectedPlayList.musics.Count > 1) { int index = this.PlayListCollections.IndexOf(this.SelectedPlayList); this.PlayListCollections[index].musics.Remove(music); this.SelectingPlayList(this.SelectedPlayList); } }
private void MusicContainer_OnChangeClick(MusicNotifyChanged music) { this.selectMusicChange = music; this.MenuEditMusic.Visibility = Visibility.Visible; this.MenuEditMusic.IsEnabled = true; this.MainGrid.IsEnabled = false; this.MainGrid.Opacity = 0.5; MenuEditMusic.music = music; }
private void ListBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { if (DataListBox.SelectedIndex > -1) { MusicNotifyChanged music = (DataListBox.SelectedItem as MusicNotifyChanged); this.MusicPlay = music; this.MusicPlayIndex = DataListBox.SelectedIndex; SelectedMusic?.Invoke(music); } }
private void PlayListPanel_OnSelectedMusic(MusicNotifyChanged obj) { if (this.SelectedPlayList.Equals(this.PlayingPlayList)) { this.CustomPlayer.StopRandom(); this.CustomPlayer.PickMusic_PlayList(obj.musics); } else { this.SelectingPlayList(this.SelectedPlayList); this.CustomPlayer.StopRandom(); this.CustomPlayer.PickMusic_PlayList(obj.musics); } }