private void RefreshData() { IsLoading = true; btnRefresh.IsEnabled = false; MissingAnimeCollection.Clear(); AnimeCount = 0; workerAnime.RunWorkerAsync(); }
void workerFiles_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { List <JMMServerBinary.Contract_IgnoreAnime> contracts = e.Result as List <JMMServerBinary.Contract_IgnoreAnime>; foreach (JMMServerBinary.Contract_IgnoreAnime mf in contracts) { MissingAnimeCollection.Add(new IgnoreAnimeVM(mf)); } AnimeCount = contracts.Count; btnRefresh.IsEnabled = true; IsLoading = false; this.Cursor = Cursors.Arrow; }