Esempio n. 1
0
        private void SearchTrakt(string ExistingTraktID)
        {
            try
            {
                if (!(DataContext is VM_AniDB_Anime anime))
                {
                    return;
                }

                Window wdw = Window.GetWindow(this);

                Cursor = Cursors.Wait;
                SearchTraktForm frm = new SearchTraktForm();
                frm.Owner = wdw;
                frm.Init(anime.AnimeID, anime.FormattedTitle, anime.FormattedTitle, ExistingTraktID, anime);
                bool?result = frm.ShowDialog();
                if (result != null && result.Value)
                {
                    RefreshData();
                }

                Cursor = Cursors.Arrow;
            }
            catch (Exception ex)
            {
                Utils.ShowErrorMessage(ex);
            }
        }
Esempio n. 2
0
        private void SearchTrakt(string ExistingTraktID)
        {
            try
            {
                AniDB_AnimeVM anime = this.DataContext as AniDB_AnimeVM;
                if (anime == null)
                {
                    return;
                }

                Window wdw = Window.GetWindow(this);

                this.Cursor = Cursors.Wait;
                SearchTraktForm frm = new SearchTraktForm();
                frm.Owner = wdw;
                frm.Init(anime.AnimeID, anime.FormattedTitle, anime.FormattedTitle, ExistingTraktID);
                bool?result = frm.ShowDialog();
                if (result.Value)
                {
                    // update info
                    RefreshData();
                }

                this.Cursor = Cursors.Arrow;
            }
            catch (Exception ex)
            {
                Utils.ShowErrorMessage(ex);
            }
        }