private async Task LoadDatas() { IsBusy = true; NotificationMessage = "Loading..."; CurrentDemo.PlayerBlindedEvents = await _cacheService.GetDemoPlayerBlindedAsync(CurrentDemo); _flashbangService.Demo = CurrentDemo; PlayersFlashTimes = await _flashbangService.GetPlayersFlashTimesData(); if (PlayersFlashTimes.Any()) { MaxDurationPlayer = PlayersFlashTimes.Max(p => p.Duration); } TeamsFlashTimes = await _flashbangService.GetTeamsFlashTimesData(); if (TeamsFlashTimes.Any()) { MaxDurationTeam = TeamsFlashTimes.Max(p => p.Duration); } AverageFlashTimesPlayers = await _flashbangService.GetAverageFlashTimesPlayersData(); if (AverageFlashTimesPlayers.Any()) { MaxDurationAveragePlayer = AverageFlashTimesPlayers.Max(p => p.Duration); } IsBusy = false; }
private async Task LoadDatas() { IsBusy = true; Notification = Properties.Resources.NotificationLoading; Demo.PlayerBlinded = await _cacheService.GetDemoPlayerBlindedAsync(Demo); _flashbangService.Demo = Demo; PlayersFlashTimes = await _flashbangService.GetPlayersFlashTimesData(); if (PlayersFlashTimes.Any()) { MaxDurationPlayer = PlayersFlashTimes.Max(p => p.Duration); } TeamsFlashTimes = await _flashbangService.GetTeamsFlashTimesData(); if (TeamsFlashTimes.Any()) { MaxDurationTeam = TeamsFlashTimes.Max(p => p.Duration); } AverageFlashTimesPlayers = await _flashbangService.GetAverageFlashTimesPlayersData(); if (AverageFlashTimesPlayers.Any()) { MaxDurationAveragePlayer = AverageFlashTimesPlayers.Max(p => p.Duration); } IsBusy = false; }