private void RefreshAdminData() { try { if (VM_ShokoServer.Instance.ShowCommunity) { if (!(DataContext is VM_AniDB_Anime anime)) { return; } CommunityTVDBLinks.Clear(); CommunityTraktLinks.Clear(); btnTvDBCommLinks1.IsEnabled = false; btnTvDBCommLinks2.IsEnabled = false; CommTvDBButtonText = Commons.Properties.Resources.CommunityLinks_CheckingOnline; btnTraktCommLinks1.IsEnabled = false; btnTraktCommLinks2.IsEnabled = false; CommTraktButtonText = Commons.Properties.Resources.CommunityLinks_CheckingOnline; if (!communityWorker.IsBusy) { communityWorker.RunWorkerAsync(anime); } } } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }
private void RefreshAdminData() { try { if (JMMServerVM.Instance.ShowCommunity) { AniDB_AnimeVM anime = this.DataContext as AniDB_AnimeVM; if (anime == null) { return; } CommunityTVDBLinks.Clear(); CommunityTraktLinks.Clear(); btnTvDBCommLinks1.IsEnabled = false; btnTvDBCommLinks2.IsEnabled = false; CommTvDBButtonText = "Checking Online..."; btnTraktCommLinks1.IsEnabled = false; btnTraktCommLinks2.IsEnabled = false; CommTraktButtonText = "Checking Online..."; if (!communityWorker.IsBusy) { communityWorker.RunWorkerAsync(anime); } } } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }