Exemple #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (dataGridView2.CurrentRow == null)
            {
                return;
            }
            MediaFileModel selectedFile = dataGridView2.CurrentRow.DataBoundItem as MediaFileModel;

            addPlaylist.Remove(selectedFile);
            allMedia.Add(selectedFile);
        }
Exemple #2
0
        private MediaFileModel findDataInSet(String filename)
        {
            MediaFileModel match = new MediaFileModel();

            foreach (MediaFileModel model in allMedia)
            {
                String modelName = model.Name;
                if (!modelName.Equals(filename))
                {
                    continue;
                }
                match = model;
            }
            return(match);
        }
Exemple #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (dataGridView1.CurrentRow == null)
            {
                return;
            }
            MediaFileModel currentFile = dataGridView1.CurrentRow.DataBoundItem as MediaFileModel;
            String         filename    = currentFile.Name;

            try
            {
                allMedia.Remove(currentFile);
                addPlaylist.Add(currentFile);
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message);
            }
        }