StatisticsViewModel.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using IViewModel;
  2. using IViewModel.Models;
  3. using IViewModel.ViewModels;
  4. using Shaker.Models;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace Dynamicloadsimulationdevice.ViewModels
  11. {
  12. public class StatisticsViewModel:ViewModelBase<StatisticsModel>
  13. {
  14. public StatisticsViewModel():base()
  15. {
  16. }
  17. public StatisticsViewModel(StatisticsModel model):base(model)
  18. {
  19. }
  20. [PropertyAssociation(nameof(StatisticsModel.Name))]
  21. public string Name { get => Model.Name; set =>SetProperty(ref Model.Name , value); }
  22. [PropertyAssociation(nameof(StatisticsModel.Max))]
  23. public float Max { get => Model.Max; set =>SetProperty(ref Model.Max , value); }
  24. [PropertyAssociation(nameof(StatisticsModel.Min))]
  25. public float Min { get => Model.Min; set =>SetProperty(ref Model.Min, value); }
  26. [PropertyAssociation(nameof(StatisticsModel.RMS))]
  27. public float RMS { get => Model.RMS; set =>SetProperty(ref Model.RMS , value); }
  28. [PropertyAssociation(nameof(StatisticsModel.Average))]
  29. public float Average { get => Model.Average; set => SetProperty(ref Model.Average, value); }
  30. [PropertyAssociation(nameof(StatisticsModel.Unit))]
  31. public string Unit { get => Model.Unit; set =>SetProperty(ref Model.Unit , value); }
  32. public override void UpDateModel(StatisticsModel model)
  33. {
  34. base.UpDateModel(model);
  35. }
  36. }
  37. }