Exemple #1
0
        private void playMediaCmd()
        {
            IEnumerable <Media> lv = ListVideos.Where(m => m.IsSelected == true);
            IEnumerable <Media> lm = ListSongs.Where(m => m.IsSelected == true);
            IEnumerable <Media> lp = ListPictures.Where(m => m.IsSelected == true);

            if (lv.Count() > 0)
            {
                _player.Stop();
                _media = lv.ElementAt(0);
                OnOpenMedia(_media.FileName);
            }
            else if (lm.Count() > 0)
            {
                _player.Stop();
                _media = lm.ElementAt(0);
                OnOpenMedia(_media.FileName);
            }
            else if (lp.Count() > 0)
            {
                _player.Stop();
                _media = lp.ElementAt(0);
                OnOpenMedia(_media.FileName);
            }
        }
Exemple #2
0
        private void addSongToPlayList()
        {
            IEnumerable <Media> lm = ListSongs.Where(m => m.IsSelected == true);

            foreach (Media m in lm)
            {
                _playlist.ListMedia.Add(m);
            }
        }
Exemple #3
0
        private void deleteSongCmd()
        {
            List <AudioMedia>        tmp = new List <AudioMedia>();
            IEnumerable <AudioMedia> lm  = ListSongs.Where(m => m.IsSelected == true);


            foreach (AudioMedia m in lm)
            {
                tmp.Add(m);
            }
            foreach (AudioMedia m in tmp)
            {
                ListSongs.Remove(m);
            }
            saveSongs();
        }