private void btn_test_Click(object sender, EventArgs e) { if (TestingToolkit.YoutubePathExists(tb_urlPath.Text)) { MessageBox.Show($"{tb_urlPath.Text} is a valid YouTube url.\nLet the fun begin!"); } else { MessageBox.Show($"{tb_urlPath.Text} is not a valid YouTube url.\nSorry, try again."); } }
void EditYoutubePath(object sender, EventArgs e) { using (YouTubePathDialog ypd = new YouTubePathDialog()) { ypd.ShowDialog(); if (ypd.DialogResult == DialogResult.OK) { if (TestingToolkit.YoutubePathExists(ypd.FilePathReturned)) { l_youtubepath.ForeColor = Color.Green; } else { l_youtubepath.ForeColor = Color.Red; } l_youtubepath.Text = ypd.FilePathReturned; } } }