private string checkNameExists() { string showNameNoSpaces = showName.Replace(" ", "+"); string getName = DownloadFromApi.apiGet("https://api.thetvdb.com/search/series?name=" + showNameNoSpaces, token, 0); info = getName; if (info == "Error") { return("Error!"); } var w = new SelectShow(info); w.ShowDialog(); return(w.Return); }
private void findShow_Click(object sender, RoutedEventArgs e) { string showNameNoSpaces = textBox_Copy.Text.Replace(" ", "+"); string getName = DownloadFromApi.apiGet("https://api.thetvdb.com/search/series?name=" + showNameNoSpaces, tkn, 0); info = getName; if (info == "Error") { MessageBox.Show("Re-check your data or make sure that you are connected to the internet."); } else { var w = new SelectShow(info); w.ShowDialog(); ID = w.Return; enableStart(); } }