using Shaker.Models; using ShakerApp.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ShakerApp.ViewModels { internal class AccelerationConfigViewModel:ViewModelBase { public AccelerationConfigViewModel() : base() { } public AccelerationConfigViewModel(AccelerationConfigModel model) : base(model) { } [PropertyAssociation(nameof(AccelerationConfigModel.Weight))] public float Weight { get => Model.Weight; set => SetProperty(ref Model.Weight,Math.Clamp(value,0,1)); } [PropertyAssociation(nameof(AccelerationConfigModel.Sensitivity))] public float Sensitivity { get => Model.Sensitivity;set=> SetProperty(ref Model.Sensitivity, value); } [PropertyAssociation(nameof(AccelerationConfigModel.Polarity))] public Shaker.Models.Polarity Polarity {get=>Model.Polarity;set=>SetProperty(ref Model.Polarity, value); } } }