Exemple #1
0
        private void buDel_Click(object sender, EventArgs e)
        {
            foreach (DataRow row in dataSet.Tables[0].Rows)
            {
                if (Convert.ToString(row["Name"]) == lv.SelectedItems[0].Text)
                {
                    row.Delete();
                    dataSet.AcceptChanges();
                    break;
                }
            }
            lv.Items.Remove(lv.SelectedItems[0]);


            string json = JsonConvert.SerializeObject(dataSet);


            MF = (WindowsApplication.MainForm)Application.OpenForms["MainForm"];
            using (FileStream fs = new FileStream("JSON/" + MF.filename + "+" + MF.video.Duration + ".json", FileMode.Create))
            {
                StreamWriter w = new StreamWriter(fs);
                w.WriteLine(json);
                w.Close();
                fs.Close();
            }

            MF.Reload_Bookmarks();
        }
Exemple #2
0
        private void lbPlaylist_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            int index = this.lbPlaylist.IndexFromPoint(e.Location);

            if (index != System.Windows.Forms.ListBox.NoMatches)
            {
                MF = (WindowsApplication.MainForm)Application.OpenForms["MainForm"];
                MF.Activate();
                MF.LoadVideo(videoPath[index].ToString());
            }
        }