예제 #1
0
            public async Task InitializeLater()
            {
                await SelectedObject.GetSoundOrigin();

                await Task.Delay(500);

                await LapTimesManager.Instance.UpdateAsync();

                UpdateLapTimes();
            }
예제 #2
0
            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;
                }
            }
예제 #3
0
 public async Task InitializeLater()
 {
     await SelectedObject.GetSoundOrigin();
 }