private void SearchButton_Click(object sender, RoutedEventArgs e) { if (!PlaylistAPI.DoesApiFileExist()) { PlaylistAPI.CreateAPIFile(); Logger.Log("Paste your api key in the \"api.txt\" file, in the same Directory as this program"); return; } if (!IsPlaylistUrlValid(PlaylistURL_TextBox.Text)) { return; } Playlists playlists = new Playlists(); playlists.GetPlaylistFromYoutube(PlaylistName_TextBox.Text, PlaylistURL_TextBox.Text); Close(); }