public void ClearReplays() { _log.Information("Clearing replay list..."); App.Current.Dispatcher.Invoke((Action) delegate { PreviewReplays.Clear(); }); FileResults.Clear(); }
/// <summary> /// The function to call to refresh the list /// </summary> /// <returns></returns> public async Task ReloadReplayList() { _log.Information($"Refreshing replay list..."); FileResults.Clear(); PreviewReplays.Clear(); StatusBarModel.StatusMessage = Application.Current.TryFindResource("LoadingMessageReplay") as string; StatusBarModel.Color = Brushes.White; StatusBarModel.Visible = true; StatusBarModel.ShowProgressBar = true; await _fileManager.InitialLoadAsync().ConfigureAwait(true); LoadReplays(); StatusBarModel.StatusMessage = Application.Current.TryFindResource("LoadingMessageThumbnails") as string; await LoadPreviewPlayerThumbnails().ConfigureAwait(true); StatusBarModel.Visible = false; }
/// <summary> /// The function to call to refresh the list /// </summary> /// <returns></returns> public async Task ReloadReplayList() { _log.Information($"Refreshing replay list..."); FileResults.Clear(); PreviewReplays.Clear(); ValidateReplayStorage(); StatusBarModel.StatusMessage = Application.Current.TryFindResource("LoadingMessageReplay") as string; StatusBarModel.Visible = true; StatusBarModel.ShowProgressBar = true; // Discover and load replays into database await _fileManager.InitialLoadAsync().ConfigureAwait(true); // Load from database into our viewmodel LoadReplaysFromDatabase(); StatusBarModel.StatusMessage = Application.Current.TryFindResource("LoadingMessageThumbnails") as string; await LoadPreviewPlayerThumbnails().ConfigureAwait(true); StatusBarModel.Visible = false; }