Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
            {
                return;
            }

            if (!Playlist.getAllPlaylists().Contains(textBox1.Text))
            {
                Playlist.createPlaylist(textBox1.Text);
                DialogResult = System.Windows.Forms.DialogResult.OK;
                this.Close();
            }
            else
            {
                MessageBox.Show("There is a playlist with that name.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
        }