1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using IViewModel.ViewModels;
- using IViewModel.Tools;
- using Shaker.Models;
- using Shaker.Tools;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Dynamicloadsimulationdevice.ViewModels
- {
- internal sealed class ResultChannelViewModel : ViewModelBase<ResultChannelModel>
- {
- public ResultChannelViewModel():base()
- {
- }
- public ResultChannelViewModel(ResultChannelModel model):base(model)
- {
- }
- public override void UpDateModel(ResultChannelModel model)
- {
- base.UpDateModel(model);
- Unit = ChannelType.GetUnit();
- Name = ChannelType.Description();
- }
- private string unit=string.Empty;
- private string name = string.Empty;
- /// <summary>
- /// 通道定义
- /// </summary>
- public Shaker.Model.ResultChannel Channel { get => Model.Channel; set => Model.Channel = value; }
- /// <summary>
- /// 通道类型
- /// </summary>
- public Shaker.Model.ResultChannelType ChannelType => Model.ChannelType;
- /// <summary>
- /// 单位
- /// </summary>
- public string Unit { get => unit; private set =>SetProperty(ref unit, value); }
- /// <summary>
- /// 名称
- /// </summary>
- public string Name { get => name; private set => name = value; }
- public override string ToString()
- {
- return $"{ChannelType} {Channel} {Unit}";
- }
- }
- }
|