private void HandleSelectedAccountChangedMessage(SelectedAccountChangedMessage msg) { if (Properties.Settings.Default.SelectedStatsAccountSteamID != 0) { Application.Current.Dispatcher.Invoke(async() => { HasNotification = true; IsBusy = true; NotificationMessage = "Searching account's last rank..."; DataGridDemosCollection.Refresh(); LastRankAccountStats = await _demosService.GetLastRankAccountStatsAsync(); IsBusy = false; HasNotification = false; CommandManager.InvalidateRequerySuggested(); }); } }
public async Task LoadDemosHeader() { NotificationMessage = "Loading..."; IsBusy = true; HasNotification = true; try { List <string> folders = new List <string>(); if (SelectedFolder != null) { folders.Add(SelectedFolder); } else { folders = Folders.ToList(); } Demos.Clear(); var demos = await _demosService.GetDemosHeader(folders); foreach (var demo in demos) { Demos.Add(demo); } DataGridDemosCollection.Refresh(); } catch (Exception e) { Logger.Instance.Log(e); } finally { IsBusy = false; HasNotification = false; } }