Example #1
0
        private void MenuItem_UserSongList_Click(object sender, RoutedEventArgs e)
        {
            IList          LIST    = UserSongList.SelectedItems;
            int            total   = LIST.Count;
            SongInfoExpend curinfo = PlayListBase.PlayListSongs[PlayListBase.PlayListIndex - 1];

            for (int i = 0; i < total; i++)
            {
                PlayListBase.PlayListSongs.Remove((SongInfoExpend)LIST[0]);
            }
            int j;

            if (PlayListBase.PlayListSongs.Count == 0)
            {
                PlayListBase.PlayListIndex = 0;
                PlayListBase.SendMsg(MyMsgType.Stop, "");
            }
            else if ((j = PlayListBase.PlayListSongs.IndexOf(curinfo)) >= 0)
            {
                PlayListBase.PlayListIndex = j + 1;
            }
            else
            {
                PlayListBase.SendMsg(MyMsgType.Stop, "");
            }
        }
Example #2
0
        private void UserSongList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ListBoxItem item = Helper.UIhelper.FindPrent <ListBoxItem>((DependencyObject)e.OriginalSource);

            if (item == null)
            {
                return;
            }
            PlayListAlbumImageShowListBox.ImageListBox.ScrollIntoView(item.DataContext);
            PlayListAlbumImageShowListBox.ImageListBox.SelectedItem = item.DataContext;
            PlayListBase.PlayListIndex = UserSongList.SelectedIndex + 1;
            PlayListBase.PlayAndExceptionPass();
        }