public async Task InitializeLater() { await SelectedObject.GetSoundOrigin(); await Task.Delay(500); await LapTimesManager.Instance.UpdateAsync(); UpdateLapTimes(); }
private void OnObjectPropertyChanged(object sender, PropertyChangedEventArgs e) { switch (e.PropertyName) { case nameof(CarObject.SpecsBhp): case nameof(CarObject.SpecsWeight): if (RecalculatePwRatioAutomatically) { RecalculatePwRatioCommand.Execute(); } break; case nameof(AcCommonObject.Year): InnerFilterCommand?.RaiseCanExecuteChanged(); break; case nameof(CarObject.Brand): if (SettingsHolder.Content.ChangeBrandIconAutomatically) { var entry = FilesStorage.Instance.GetContentFile(ContentCategory.BrandBadges, SelectedObject.Brand + @".png"); if (entry.Exists) { try { FileUtils.Recycle(SelectedObject.BrandBadge); File.Copy(entry.Filename, SelectedObject.BrandBadge); BetterImage.Refresh(SelectedObject.BrandBadge); } catch (Exception ex) { Logging.Warning(ex); } } } break; case nameof(CarObject.SoundDonorId): SelectedObject.GetSoundOrigin().Forget(); break; } }
public async Task InitializeLater() { await SelectedObject.GetSoundOrigin(); }