Exemplo n.º 1
0
 public void AddSong(LuoVolSong item)
 {
     if (!IsHeartedSong(item))
     {
         HeartSongs.Add(item);
     }
 }
Exemplo n.º 2
0
 private async void ListView_ItemClick_1(object sender, ItemClickEventArgs e)
 {
     LuoVolSong item = (LuoVolSong)e.ClickedItem;
     //MainVM.CurrentSong = item;
     //Player.Source=MediaSource.CreateFromUri(new Uri(item.SongUrl));
     await MainVM.InstantPlayAsync(MainVM.CurrentVol.Vol.VolSongs, MainVM.CurrentVol.Vol.VolSongs.IndexOf(item));
 }
Exemplo n.º 3
0
        private async void ListView_ItemClick_1(object sender, ItemClickEventArgs e)
        {
            LuoVolSong item = (LuoVolSong)e.ClickedItem;

            if (MainVM.CurrentSong == item)
            {
                if (MainVM.IsPlaying)
                {
                    MainVM.player.Pause();
                }
                else
                {
                    MainVM.player.Play();
                }
            }
            else
            {
                await MainVM.InstantPlayAsync(MainVM.CurrentPlayVol.Vol.VolSongs, MainVM.CurrentPlayVol.Vol.VolSongs.IndexOf(item));
            }
        }
Exemplo n.º 4
0
        private async void ListView_ItemClick_1(object sender, ItemClickEventArgs e)
        {
            LuoVolSong item = (LuoVolSong)e.ClickedItem;

            //MainVM.CurrentSong = item;
            //Player.Source=MediaSource.CreateFromUri(new Uri(item.SongUrl));
            if ((MainVM.CurrentPlayVol == MainVM.CurrentVol) && (MainVM.CurrentSong == item))
            {
                if (MainVM.IsPlaying)
                {
                    MainVM.player.Pause();
                }
                else
                {
                    MainVM.player.Play();
                }
            }
            else
            {
                MainVM.CurrentPlayVol = MainVM.CurrentVol;
                await MainVM.InstantPlayAsync(MainVM.CurrentVol.Vol.VolSongs, MainVM.CurrentVol.Vol.VolSongs.IndexOf(item));
            }
        }
Exemplo n.º 5
0
 public void RemoveSong(LuoVolSong item)
 {
     HeartSongs.Remove(item);
 }
Exemplo n.º 6
0
 public bool IsHeartedSong(LuoVolSong item)
 {
     return(HeartSongs.Any(p => p.Name == item.Name));
 }