using Microsoft.Toolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BPASmartClient.Model
{
///
/// 原料模块
///
public class RawMaterialModel : ObservableObject
{
///
/// 原料名称
///
public string RawMaterialName { get { return _mRawMaterialName; } set { _mRawMaterialName = value; OnPropertyChanged(); } }
private string _mRawMaterialName;
///
/// 原料设备IP
///
public string DeviceIp { get; set; }
///
/// 料筒位置
///
public int Loc { get { return _mLoc; } set { _mLoc = value; OnPropertyChanged(); } }
private int _mLoc;
///
/// 原料重量设置
///
public uint RawMaterialWeight { get { return _mRawMaterialWeight; } set { _mRawMaterialWeight = value; OnPropertyChanged(); } }
private uint _mRawMaterialWeight;
///
/// 原料来源
/// 0:本地
/// 1:设备
///
public ushort RawMaterialSource { get { return _mRawMaterialSource; } set { _mRawMaterialSource = value; OnPropertyChanged(); } }
private ushort _mRawMaterialSource = 1;
///
/// 原料ID
///
public string RawMaterialId { get { return _mRawMaterialId; } set { _mRawMaterialId = value; OnPropertyChanged(); } }
private string _mRawMaterialId;
///
/// 选中索引
///
[Newtonsoft.Json.JsonIgnore]
public int SelectIndex { get { return _mSelectIndex; } set { _mSelectIndex = value; OnPropertyChanged(); } }
private int _mSelectIndex;
///
/// 原料类型 MW18
/// 1:液体
/// 2:膏体
/// 3:粉体
///
[Newtonsoft.Json.JsonIgnore]
public ushort RawMaterialType { get { return _mRawMaterialType; } set { _mRawMaterialType = value; OnPropertyChanged(); } }
private ushort _mRawMaterialType;
///
/// 料仓重量反馈 MD40
///
[Newtonsoft.Json.JsonIgnore]
public float WeightFeedback { get { return _mWeightFeedback; } set { _mWeightFeedback = value; OnPropertyChanged(); } }
private float _mWeightFeedback;
///
/// 上限反馈
///
[Newtonsoft.Json.JsonIgnore]
public bool UpLimtFeedback { get { return _mUpLimtFeedback; } set { _mUpLimtFeedback = value; OnPropertyChanged(); } }
private bool _mUpLimtFeedback;
///
/// 下限反馈
///
[Newtonsoft.Json.JsonIgnore]
public bool DownLimtFeedback { get { return _mDownLimtFeedback; } set { _mDownLimtFeedback = value; OnPropertyChanged(); } }
private bool _mDownLimtFeedback;
///
/// 下料重量反馈 MD52
///
[Newtonsoft.Json.JsonIgnore]
public float UpLimtWeightFeedback { get { return _mUpLimtWeightFeedback; } set { _mUpLimtWeightFeedback = value; OnPropertyChanged(); } }
private float _mUpLimtWeightFeedback;
///
/// 原料设备执行状态
/// 1:等待配料
/// 2:下料中
/// 3:下料完成
///
[Newtonsoft.Json.JsonIgnore]
public ushort RecipeStatus
{
get { return _mRecipeStatus; }
set
{
_mRecipeStatus = value;
if (value == 1 && Status != Status.配料完成) Status = Status.等待配料;
else if (value == 2) Status = Status.正在配料;
else if (value == 3) Status = Status.配料完成;
OnPropertyChanged();
}
}
private ushort _mRecipeStatus = 1;
///
/// 配料状态名称
///
[Newtonsoft.Json.JsonIgnore]
public Status Status { get { return _mStatus; } set { _mStatus = value; OnPropertyChanged(); } }
private Status _mStatus;
}
}