SweepControlItemViewModel.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Shaker.Models;
  2. using ShakerApp.ViewModels;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace ShakerApp.ViewModels
  9. {
  10. public class SweepControlItemViewModel : DisplayViewModelBase<SweepControlItemModel>
  11. {
  12. public SweepControlItemViewModel()
  13. {
  14. }
  15. public SweepControlItemViewModel(SweepControlItemModel model)
  16. {
  17. UpDateModel(model);
  18. }
  19. [PropertyAssociation(nameof(SweepControlItemModel.Frequency))]
  20. /// <summary>
  21. /// 频率
  22. /// </summary>
  23. public float Frequency { get => Model.Frequency; set => SetProperty(ref Model.Frequency, value); }
  24. [PropertyAssociation(nameof(SweepControlItemModel.UpDateInvert))]
  25. /// <summary>
  26. /// 更新间隔
  27. /// </summary>
  28. public uint UpDateInvert { get => Model.UpDateInvert; set => SetProperty(ref Model.UpDateInvert, value); }
  29. [PropertyAssociation(nameof(SweepControlItemModel.ExponentialCoefficients))]
  30. /// <summary>
  31. /// 指数系数
  32. /// </summary>
  33. public float ExponentialCoefficients { get => Model.ExponentialCoefficients; set => SetProperty(ref Model.ExponentialCoefficients, value); }
  34. [PropertyAssociation(nameof(SweepControlItemModel.AdjustMagnitude))]
  35. /// <summary>
  36. /// 位移调整系数
  37. /// </summary>
  38. public float AdjustMagnitude { get => Model.AdjustMagnitude; set => SetProperty(ref Model.AdjustMagnitude, value); }
  39. [PropertyAssociation(nameof(SweepControlItemModel.CompressionRate))]
  40. public float CompressionRate { get => Model.CompressionRate; set => SetProperty(ref Model.CompressionRate, value); }
  41. }
  42. }