private void btn_Ok_video_Click(object sender, EventArgs e)
        {
            bool check = true;

            if (tb_Name.Text == "")
            {
                MessageBox.Show("Enter a playlist's name", "Notify");
            }
            else
            {
                foreach (PlayListInfoVideo item in PlaylistVideo.Instance.GetAllPlayListVideo())
                {
                    if (tb_Name.Text == item.Name_PL)
                    {
                        check = false;
                        MessageBox.Show("This name is already.", "Error");
                    }
                }
                if (check == true)
                {
                    PlaylistVideo.Instance.AddItems(new PlayListInfoVideo(DateTime.Now, tb_Name.Text, listVideo));
                    Form_Video_Playlist NewForm = new Form_Video_Playlist(new Video_Playlist(PlaylistVideo.Instance.GetAllPlayListVideo().Count - 1, this.tb_Name.Text, 0, this.parent));
                    this.parent.openChildForm(NewForm);
                    PlaylistVideo.Instance.Export();
                    PlaylistVideo.Instance.GetListVideo(PlaylistVideo.Instance.GetAllPlayListVideo().Count - 1).Export();
                    Close();
                }
            }
        }
예제 #2
0
 public form_Rename_pl(Form_Video_Playlist mother = null)
 {
     this.mother = mother;
     InitializeComponent();
 }