Ejemplo n.º 1
0
        public void ejecutar(Playlist_movie playlist_Movie)
        {
            string name = playlist_Movie.Name;

            p2.Add(playlist_Movie);
            listBox2.Items.Add(name);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            string type = comboBox1.SelectedItem.ToString();
            string name = textBox1.Text;
            bool   priv = Privacidad.Checked;

            if (type == "Song")
            {
                List <Song>   songs = new List <Song>();
                Playlist_song p     = new Playlist_song(0, name, priv, 0, songs);
                pasados(p);
                textBox1.Clear();
                Privacidad.Checked = false;
            }
            else
            {
                List <Movie>   movies = new List <Movie>();
                Playlist_movie m      = new Playlist_movie(0, name, priv, 0, movies);
                pasadom(m);
                textBox1.Clear();
                Privacidad.Checked = false;
            }
        }