private void SearchMovieDB() { try { if (!(DataContext is VM_AniDB_Anime anime)) { return; } Window wdw = Window.GetWindow(this); Cursor = Cursors.Wait; SearchMovieDBForm frm = new SearchMovieDBForm(); frm.Owner = wdw; frm.Init(anime.AnimeID, anime.FormattedTitle); bool?result = frm.ShowDialog(); if (result != null && result.Value) { RefreshData(); } Cursor = Cursors.Arrow; } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }
private void SearchMovieDB() { try { AniDB_AnimeVM anime = this.DataContext as AniDB_AnimeVM; if (anime == null) { return; } Window wdw = Window.GetWindow(this); this.Cursor = Cursors.Wait; SearchMovieDBForm frm = new SearchMovieDBForm(); frm.Owner = wdw; frm.Init(anime.AnimeID, anime.FormattedTitle); bool?result = frm.ShowDialog(); if (result.Value) { // update info RefreshData(); } this.Cursor = Cursors.Arrow; } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }