コード例 #1
0
 public void btn_AddPl_Click(object sender, EventArgs e)
 {
     if (btn_Music.selected == true)
     {
         form_Music_NewPlaylist form_Playlist = new form_Music_NewPlaylist(this);
         Point p = new Point(this.Width / 2 - form_Playlist.Width / 2, this.Height / 2 - form_Playlist.Height / 2);
         form_Playlist.StartPosition = FormStartPosition.CenterParent;
         form_Playlist.ShowDialog();
     }
     if (btn_Video.selected == true)
     {
         Form_Video_NewPlaylist form_Playlist = new Form_Video_NewPlaylist(this);
         Point p = new Point(this.Width / 2 - form_Playlist.Width / 2, this.Height / 2 - form_Playlist.Height / 2);
         form_Playlist.StartPosition = FormStartPosition.CenterParent;
         form_Playlist.ShowDialog();
     }
 }
コード例 #2
0
        public void AddToNewPlaylist()
        {
            if (listView_myvideo.SelectedItems.Count == 0)
            {
                SelectAll();
            }
            List <VideoInfo> listVid = new List <VideoInfo>();

            for (int i = 0; i < listView_myvideo.SelectedItems.Count; i++)
            {
                listVid.Add(new VideoInfo(listView_myvideo.SelectedItems[i].SubItems[5].Text));
            }
            Form_Video_NewPlaylist form_Playlist = new Form_Video_NewPlaylist(this.parent, listVid);
            Point p = new Point(this.Width / 2 - form_Playlist.Width / 2, this.Height / 2 - form_Playlist.Height / 2);

            form_Playlist.StartPosition = FormStartPosition.CenterParent;
            form_Playlist.ShowDialog();
        }