public void deleteVideoFromAdd(ListViewItemMy pos)
        {
            int ind = addVideos.Items.IndexOf(pos);

            addVideos.Items.RemoveAt(ind);
            addVideos.Items.Refresh();
        }
        public void deleteVideoFromQueue(ListViewItemMy pos)
        {
            int ind = kolejka.Items.IndexOf(pos);

            kolejka.Items.RemoveAt(ind);
            kolejka.Items.Refresh();
        }
Example #3
0
        public Video(string linkOrID)
        {
            string id;

            if (linkOrID.Length != 11)
            {
                id = linkOrID.Substring(linkOrID.IndexOf("v=") + 2, 11);
            }
            else
            {
                id = linkOrID;
            }
            if (!isVideoLoaded(id))
            {
                videoID = id;
                addToGetParams(this);
                ListViewItemMy pos = new ListViewItemMy {
                    title = id, duration = videoDuration, status = "---", check = false
                };
                ((MainWindow)System.Windows.Application.Current.MainWindow).addVideoToList(pos);
                position = pos;
                _listOfVideos.Add(this);
                PlayList play = new PlayList(this);
                playList = PlayList.singleVideos;
            }
        }
 public void addVideoToList(ListViewItemMy videom)
 {
     addVideos.Items.Add(videom);
     addVideos.Items.Refresh();
 }
 public void addVideoToQueue(ListViewItemMy video)
 {
     kolejka.Items.Add(video);
     kolejka.Items.Refresh();
 }