protected override void OnNewViewModel(SuspensionVelocityWheelsChartViewModel newViewModel) { _carProperties = _settingsController.GetCarPropertiesForCurrentCar(); newViewModel.BandSize = _carProperties.ChartsProperties.SuspensionVelocityHistogram.BandSize.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); newViewModel.Maximum = _carProperties.ChartsProperties.SuspensionVelocityHistogram.Maximum.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); newViewModel.Minimum = _carProperties.ChartsProperties.SuspensionVelocityHistogram.Minimum.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.FrontLeftChartViewModel).BumpTransition = _carProperties.FrontLeftTyre.BumpTransition.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.FrontLeftChartViewModel).ReboundTransition = _carProperties.FrontLeftTyre.ReboundTransition.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.FrontLeftChartViewModel).Unit = Velocity.GetUnitSymbol(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.FrontRightChartViewModel).BumpTransition = _carProperties.FrontRightTyre.BumpTransition.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.FrontRightChartViewModel).ReboundTransition = _carProperties.FrontRightTyre.ReboundTransition.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.FrontRightChartViewModel).Unit = Velocity.GetUnitSymbol(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.RearLeftChartViewModel).BumpTransition = _carProperties.RearLeftTyre.BumpTransition.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.RearLeftChartViewModel).ReboundTransition = _carProperties.RearLeftTyre.ReboundTransition.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.RearLeftChartViewModel).Unit = Velocity.GetUnitSymbol(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.RearRightChartViewModel).BumpTransition = _carProperties.RearRightTyre.BumpTransition.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.RearRightChartViewModel).ReboundTransition = _carProperties.RearRightTyre.ReboundTransition.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); ((SuspensionVelocityHistogramChartViewModel)newViewModel.RearRightChartViewModel).Unit = Velocity.GetUnitSymbol(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); newViewModel.BandSize = _carProperties.ChartsProperties.SuspensionVelocityHistogram.BandSize.GetValueInUnits(_suspensionVelocityHistogramDataExtractor.VelocityUnitsSmall); }
protected override void OnNewViewModel(CamberWheelsChartViewModel newViewModel) { _currentCar = _settingsController.GetCarPropertiesForCurrentCar(); newViewModel.IsLoadedChecked = _currentCar.ChartsProperties.CamberHistogram.IsLoadedSelected; newViewModel.IsUnloadedChecked = _currentCar.ChartsProperties.CamberHistogram.IsUnloadedSelected; newViewModel.FromG = _currentCar.ChartsProperties.CamberHistogram.FromG; newViewModel.ToG = _currentCar.ChartsProperties.CamberHistogram.ToG; newViewModel.BandSize = _currentCar.ChartsProperties.CamberHistogram.BandSize.GetValueInUnits(_camberHistogramExtractor.AngleUnits); newViewModel.FromCamber = _currentCar.ChartsProperties.CamberHistogram.FromCamber.GetValueInUnits(_camberHistogramExtractor.AngleUnits); newViewModel.ToCamber = _currentCar.ChartsProperties.CamberHistogram.ToCamber.GetValueInUnits(_camberHistogramExtractor.AngleUnits); ((CamberHistogramChartViewModel)newViewModel.FrontLeftChartViewModel).IdealCamber = _currentCar.FrontLeftTyre.IdealCamber.GetValueInUnits(_camberHistogramExtractor.AngleUnits); ((CamberHistogramChartViewModel)newViewModel.FrontRightChartViewModel).IdealCamber = _currentCar.FrontRightTyre.IdealCamber.GetValueInUnits(_camberHistogramExtractor.AngleUnits); ((CamberHistogramChartViewModel)newViewModel.RearLeftChartViewModel).IdealCamber = _currentCar.RearLeftTyre.IdealCamber.GetValueInUnits(_camberHistogramExtractor.AngleUnits); ((CamberHistogramChartViewModel)newViewModel.RearRightChartViewModel).IdealCamber = _currentCar.RearRightTyre.IdealCamber.GetValueInUnits(_camberHistogramExtractor.AngleUnits); ((CamberHistogramChartViewModel)newViewModel.FrontLeftChartViewModel).AngleUnits = newViewModel.Unit; ((CamberHistogramChartViewModel)newViewModel.FrontRightChartViewModel).AngleUnits = newViewModel.Unit; ((CamberHistogramChartViewModel)newViewModel.RearLeftChartViewModel).AngleUnits = newViewModel.Unit; ((CamberHistogramChartViewModel)newViewModel.RearRightChartViewModel).AngleUnits = newViewModel.Unit; }