StatisticsViewModel.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Shaker.Models;
  2. using ShakerApp.Models;
  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 StatisticsViewModel:DisplayViewModelBase<StatisticsModel>
  11. {
  12. public StatisticsViewModel():base()
  13. {
  14. }
  15. public StatisticsViewModel(StatisticsModel model):base(model)
  16. {
  17. }
  18. [PropertyAssociation(nameof(StatisticsModel.Name))]
  19. public string Name { get => Model.Name; set =>SetProperty(ref Model.Name , value); }
  20. [PropertyAssociation(nameof(StatisticsModel.Max))]
  21. public float Max { get => Model.Max; set =>SetProperty(ref Model.Max , value); }
  22. [PropertyAssociation(nameof(StatisticsModel.Min))]
  23. public float Min { get => Model.Min; set =>SetProperty(ref Model.Min, value); }
  24. [PropertyAssociation(nameof(StatisticsModel.RMS))]
  25. public float RMS { get => Model.RMS; set =>SetProperty(ref Model.RMS , value); }
  26. [PropertyAssociation(nameof(StatisticsModel.Average))]
  27. public float Average { get => Model.Average; set => SetProperty(ref Model.Average, value); }
  28. [PropertyAssociation(nameof(StatisticsModel.Unit))]
  29. public string Unit { get => Model.Unit; set =>SetProperty(ref Model.Unit , value); }
  30. public override void UpDateModel(StatisticsModel model)
  31. {
  32. base.UpDateModel(model);
  33. }
  34. }
  35. }