You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

628 lines
23 KiB
C#

using Admin.Core.Wpf.Model;
using CommunityToolkit.Mvvm.ComponentModel;
/*
* 首页信息
* */
namespace Admin.Core.Wpf.ViewModel
{
public class IndexPageViewModel : ObservableObject
{
public IndexPageViewModel()
{
}
#region 更新Plc信息
public void UpdatePlc(PointsInfo point)
{
/// <summary>
/// 一体机A转速
/// </summary>
if (!string.IsNullOrEmpty(point.ASpeed)) ASpeed = point.ASpeed;
/// <summary>
/// 一体机A电流
/// </summary>
if (!string.IsNullOrEmpty(point.ACurrent)) ACurrent = point.ACurrent;
/// <summary>
/// 一体机切刀A转速
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerASpeed)) AlicerASpeed = point.AlicerASpeed;
/// <summary>
/// 一体机切刀A电流
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerACurrent)) AlicerACurrent = point.AlicerACurrent;
/// <summary>
/// 一体机B转速
/// </summary>
if (!string.IsNullOrEmpty(point.BSpeed)) BSpeed = point.BSpeed;
/// <summary>
/// 一体机B电流
/// </summary>
if (!string.IsNullOrEmpty(point.BCurrent)) BCurrent = point.BCurrent;
/// <summary>
/// 一体机切刀B转速
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerBSpeed)) AlicerBSpeed = point.AlicerBSpeed;
/// <summary>
/// 一体机切刀B电流
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerBCurrent)) AlicerBCurrent = point.AlicerBCurrent;
/// <summary>
/// 一体机A机头压力
/// </summary>
if (!string.IsNullOrEmpty(point.APressure)) APressure = point.APressure;
/// <summary>
/// 一体机A机头温度
/// </summary>
if (!string.IsNullOrEmpty(point.ATemperature)) ATemperature = point.ATemperature;
/// <summary>
/// 一体机B机头压力
/// </summary>
if (!string.IsNullOrEmpty(point.BPressure)) BPressure = point.BPressure;
/// <summary>
/// 一体机B机头温度
/// </summary>
if (!string.IsNullOrEmpty(point.BTemperature)) BTemperature = point.BTemperature;
///// <summary>
///// 一体机A转速高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.ASpeedHighSet)) ASpeedHighSet = point.ASpeedHighSet;
///// <summary>
///// 一体机A转速低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.ASpeedLowSet)) ASpeedLowSet = point.ASpeedLowSet;
///// <summary>
///// 一体机A电流高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.ACurrentHighSet)) ACurrentHighSet = point.ACurrentHighSet;
///// <summary>
///// 一体机A电流低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.ACurrentLowSet)) ACurrentLowSet = point.ACurrentLowSet;
///// <summary>
///// 一体机切刀A转速高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerSlicerASpeedHighSet)) AlicerSlicerASpeedHighSet = point.AlicerSlicerASpeedHighSet;
///// <summary>
///// 一体机切刀A转速低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerSlicerASpeedLowSet)) AlicerSlicerASpeedLowSet = point.AlicerSlicerASpeedLowSet;
///// <summary>
///// 一体机切刀A电流高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerSlicerACurrentHighSet)) AlicerSlicerACurrentHighSet = point.AlicerSlicerACurrentHighSet;
///// <summary>
///// 一体机切刀A电流低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerSlicerACurrentLowSet)) AlicerSlicerACurrentLowSet = point.AlicerSlicerACurrentLowSet;
///// <summary>
///// 一体机B转速高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerBSpeedHighSet)) AlicerBSpeedHighSet = point.AlicerBSpeedHighSet;
///// <summary>
///// 一体机B转速低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerBSpeedLowSet)) AlicerBSpeedLowSet = point.AlicerBSpeedLowSet;
///// <summary>
///// 一体机B电流高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerBCurrentHighSet)) AlicerBCurrentHighSet = point.AlicerBCurrentHighSet;
///// <summary>
///// 一体机B电流低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerBCurrentLowSet)) AlicerBCurrentLowSet = point.AlicerBCurrentLowSet;
///// <summary>
///// 一体机切刀B转速高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerSlicerBSpeedHighSet)) AlicerSlicerBSpeedHighSet = point.AlicerSlicerBSpeedHighSet;
///// <summary>
///// 一体机切刀B转速低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerSlicerBSpeedLowSet)) AlicerSlicerBSpeedLowSet = point.AlicerSlicerBSpeedLowSet;
///// <summary>
///// 一体机切刀B电流高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerSlicerBCurrentHighSet)) AlicerSlicerBCurrentHighSet = point.AlicerSlicerBCurrentHighSet;
///// <summary>
///// 一体机切刀B电流低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerSlicerBCurrentLowSet)) AlicerSlicerBCurrentLowSet = point.AlicerSlicerBCurrentLowSet;
///// <summary>
///// 一体机A机头压力高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerAPressureHighSet)) AlicerAPressureHighSet = point.AlicerAPressureHighSet;
///// <summary>
///// 一体机A机头压力低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerAPressureLowSet)) AlicerAPressureLowSet = point.AlicerAPressureLowSet;
///// <summary>
///// 一体机A机头温度高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerATemperatureHighSet)) AlicerATemperatureHighSet = point.AlicerATemperatureHighSet;
///// <summary>
///// 一体机A机头温度低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerATemperatureLowSet)) AlicerATemperatureLowSet = point.AlicerATemperatureLowSet;
///// <summary>
///// 一体机B机头压力高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerBPressureHighSet)) AlicerBPressureHighSet = point.AlicerBPressureHighSet;
///// <summary>
///// 一体机B机头压力低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerBPressureLowSet)) AlicerBPressureLowSet = point.AlicerBPressureLowSet;
///// <summary>
///// 一体机B机头温度高设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerBTemperatureHighSet)) AlicerBTemperatureHighSet = point.AlicerBTemperatureHighSet;
///// <summary>
///// 一体机B机头温度低设定
///// </summary>
//if (!string.IsNullOrEmpty(point.AlicerBTemperatureLowSet)) AlicerBTemperatureLowSet = point.AlicerBTemperatureLowSet;
/// <summary>
/// 一体机A运行
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerARun)) AlicerARun = (point.AlicerARun == "False") ? "停止" : "运行";
/// <summary>
/// 一体机A故障
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerAHitch)) AlicerAHitch = (point.AlicerAHitch == "False") ? "故障" : "正常";
/// <summary>
/// 一体机切刀A运行
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerSlicerARun)) AlicerSlicerARun = (point.AlicerSlicerARun == "False") ? "停止" : "运行";
/// <summary>
/// 一体机切刀A故障
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerSlicerAHitch)) AlicerSlicerAHitch = (point.AlicerSlicerAHitch == "False") ? "故障" : "正常";
/// <summary>
/// 一体机油泵A运行
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerOilPumpARun)) AlicerOilPumpARun = (point.AlicerOilPumpARun == "False") ? "停止" : "运行";
/// <summary>
/// 一体机油泵A故障
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerOilPumpAHitch)) AlicerOilPumpAHitch = (point.AlicerOilPumpAHitch == "False") ? "故障" : "正常";
/// <summary>
/// 一体机B运行
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerBRun)) AlicerBRun = (point.AlicerBRun == "False") ? "停止" : "运行";
/// <summary>
/// 一体机B故障
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerBHitch)) AlicerBHitch = (point.AlicerBHitch == "False") ? "故障" : "正常";
/// <summary>
/// 一体机切刀B运行
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerSlicerBRun)) AlicerSlicerBRun = (point.AlicerSlicerBRun == "False") ? "停止" : "运行";
/// <summary>
/// 一体机切刀B故障
/// </summary>
if (!string.IsNullOrEmpty(point.AlicerSlicerBHitch)) AlicerSlicerBHitch = (point.AlicerSlicerBHitch == "False") ? "故障" : "正常";
}
#endregion
#region 更新字段
/// <summary>
/// 一体机A转速
/// </summary>
public string aSpeed;
public string ASpeed
{
get => aSpeed;
set=>SetProperty(ref aSpeed, value);
}
/// <summary>
/// 一体机A电流
/// </summary>
public string aCurrent;
public string ACurrent
{
get => aCurrent;
set=>SetProperty(ref aCurrent, value);
}
/// <summary>
/// 一体机切刀A转速
/// </summary>
public string alicerASpeed;
public string AlicerASpeed
{
get => alicerASpeed;
set => SetProperty(ref alicerASpeed, value);
}
/// <summary>
/// 一体机切刀A电流
/// </summary>
public string alicerACurrent;
public string AlicerACurrent
{
get => alicerACurrent;
set => SetProperty(ref alicerACurrent, value);
}
/// <summary>
/// 一体机B转速
/// </summary>
public string bSpeed;
public string BSpeed
{
get => bSpeed;
set => SetProperty(ref bSpeed, value);
}
/// <summary>
/// 一体机B电流
/// </summary>
public string bCurrent;
public string BCurrent
{
get => bCurrent;
set => SetProperty(ref bCurrent, value);
}
/// <summary>
/// 一体机切刀B转速
/// </summary>
public string alicerBSpeed;
public string AlicerBSpeed
{
get => alicerBSpeed;
set => SetProperty(ref alicerBSpeed, value);
}
/// <summary>
/// 一体机切刀B电流
/// </summary>
public string alicerBCurrent;
public string AlicerBCurrent
{
get => alicerBCurrent;
set => SetProperty(ref alicerBCurrent, value);
}
/// <summary>
/// 一体机A机头压力
/// </summary>
public string aPressure;
public string APressure
{
get => aPressure;
set => SetProperty(ref aPressure, value);
}
/// <summary>
/// 一体机A机头温度
/// </summary>
public string aTemperature;
public string ATemperature
{
get => aTemperature;
set => SetProperty(ref aTemperature, value);
}
/// <summary>
/// 一体机B机头压力
/// </summary>
public string bPressure;
public string BPressure
{
get => bPressure;
set => SetProperty(ref bPressure, value);
}
/// <summary>
/// 一体机B机头温度
/// </summary>
public string bTemperature;
public string BTemperature
{
get => bTemperature;
set => SetProperty(ref bTemperature, value);
}
/// <summary>
/// 一体机A转速高设定
/// </summary>
public string bSpeedHighSet;
public string ASpeedHighSet
{
get => bSpeedHighSet;
set => SetProperty(ref bSpeedHighSet, value);
}
/// <summary>
/// 一体机A转速低设定
/// </summary>
public string bSpeedLowSet;
public string ASpeedLowSet
{
get => bSpeedLowSet;
set => SetProperty(ref bSpeedLowSet, value);
}
/// <summary>
/// 一体机A电流高设定
/// </summary>
public string aCurrentHighSet;
public string ACurrentHighSet
{
get => aCurrentHighSet;
set => SetProperty(ref aCurrentHighSet, value);
}
/// <summary>
/// 一体机A电流低设定
/// </summary>
public string aCurrentLowSet;
public string ACurrentLowSet
{
get => aCurrentLowSet;
set => SetProperty(ref aCurrentLowSet, value);
}
/// <summary>
/// 一体机切刀A转速高设定
/// </summary>
public string alicerSlicerASpeedHighSet;
public string AlicerSlicerASpeedHighSet
{
get => alicerSlicerASpeedHighSet;
set => SetProperty(ref alicerSlicerASpeedHighSet, value);
}
/// <summary>
/// 一体机切刀A转速低设定
/// </summary>
public string alicerSlicerASpeedLowSet;
public string AlicerSlicerASpeedLowSet
{
get => alicerSlicerASpeedLowSet;
set => SetProperty(ref alicerSlicerASpeedLowSet, value);
}
/// <summary>
/// 一体机切刀A电流高设定
/// </summary>
public string alicerSlicerACurrentHighSet;
public string AlicerSlicerACurrentHighSet
{
get => alicerSlicerACurrentHighSet;
set => SetProperty(ref alicerSlicerACurrentHighSet, value);
}
/// <summary>
/// 一体机切刀A电流低设定
/// </summary>
public string alicerSlicerACurrentLowSet;
public string AlicerSlicerACurrentLowSet
{
get => alicerSlicerACurrentLowSet;
set => SetProperty(ref alicerSlicerACurrentLowSet, value);
}
/// <summary>
/// 一体机B转速高设定
/// </summary>
public string alicerBSpeedHighSet;
public string AlicerBSpeedHighSet
{
get => alicerBSpeedHighSet;
set => SetProperty(ref alicerBSpeedHighSet, value);
}
/// <summary>
/// 一体机B转速低设定
/// </summary>
public string alicerBSpeedLowSet;
public string AlicerBSpeedLowSet
{
get => alicerBSpeedLowSet;
set => SetProperty(ref alicerBSpeedLowSet, value);
}
/// <summary>
/// 一体机B电流高设定
/// </summary>
public string alicerBCurrentHighSet;
public string AlicerBCurrentHighSet
{
get => alicerBCurrentHighSet;
set => SetProperty(ref alicerBCurrentHighSet, value);
}
/// <summary>
/// 一体机B电流低设定
/// </summary>
public string alicerBCurrentLowSet;
public string AlicerBCurrentLowSet
{
get => alicerBCurrentLowSet;
set => SetProperty(ref alicerBCurrentLowSet, value);
}
/// <summary>
/// 一体机切刀B转速高设定
/// </summary>
public string alicerSlicerBSpeedHighSet;
public string AlicerSlicerBSpeedHighSet
{
get => alicerSlicerBSpeedHighSet;
set => SetProperty(ref alicerSlicerBSpeedHighSet, value);
}
/// <summary>
/// 一体机切刀B转速低设定
/// </summary>
public string alicerSlicerBSpeedLowSet;
public string AlicerSlicerBSpeedLowSet
{
get => alicerBCurrentLowSet;
set => SetProperty(ref alicerSlicerBSpeedLowSet, value);
}
/// <summary>
/// 一体机切刀B电流高设定
/// </summary>
public string alicerSlicerBCurrentHighSet;
public string AlicerSlicerBCurrentHighSet
{
get => alicerSlicerBCurrentHighSet;
set => SetProperty(ref alicerSlicerBCurrentHighSet, value);
}
/// <summary>
/// 一体机切刀B电流低设定
/// </summary>
public string alicerSlicerBCurrentLowSet;
public string AlicerSlicerBCurrentLowSet
{
get => alicerSlicerBCurrentLowSet;
set => SetProperty(ref alicerSlicerBCurrentLowSet, value);
}
/// <summary>
/// 一体机A机头压力高设定
/// </summary>
public string alicerAPressureHighSet;
public string AlicerAPressureHighSet
{
get => alicerAPressureHighSet;
set => SetProperty(ref alicerAPressureHighSet, value);
}
/// <summary>
/// 一体机A机头压力低设定
/// </summary>
public string alicerAPressureLowSet;
public string AlicerAPressureLowSet
{
get => alicerAPressureLowSet;
set => SetProperty(ref alicerAPressureLowSet, value);
}
/// <summary>
/// 一体机A机头温度高设定
/// </summary>
public string alicerATemperatureHighSet;
public string AlicerATemperatureHighSet
{
get => alicerATemperatureHighSet;
set => SetProperty(ref alicerATemperatureHighSet, value);
}
/// <summary>
/// 一体机A机头温度低设定
/// </summary>
public string alicerATemperatureLowSet;
public string AlicerATemperatureLowSet
{
get => alicerATemperatureLowSet;
set => SetProperty(ref alicerATemperatureLowSet, value);
}
/// <summary>
/// 一体机B机头压力高设定
/// </summary>
public string alicerBPressureHighSet;
public string AlicerBPressureHighSet
{
get => alicerBPressureHighSet;
set => SetProperty(ref alicerBPressureHighSet, value);
}
/// <summary>
/// 一体机B机头压力低设定
/// </summary>
public string alicerBPressureLowSet;
public string AlicerBPressureLowSet
{
get => alicerBPressureLowSet;
set => SetProperty(ref alicerBPressureLowSet, value);
}
/// <summary>
/// 一体机B机头温度高设定
/// </summary>
public string alicerBTemperatureHighSet;
public string AlicerBTemperatureHighSet
{
get => alicerBTemperatureHighSet;
set => SetProperty(ref alicerBTemperatureHighSet, value);
}
/// <summary>
/// 一体机B机头温度低设定
/// </summary>
public string alicerBTemperatureLowSet;
public string AlicerBTemperatureLowSet
{
get => alicerBTemperatureLowSet;
set => SetProperty(ref alicerBTemperatureLowSet, value);
}
/// <summary>
/// 一体机A运行
/// </summary>
public string alicerARun;
public string AlicerARun
{
get => alicerARun;
set => SetProperty(ref alicerARun, value);
}
/// <summary>
/// 一体机A故障
/// </summary>
public string alicerAHitch;
public string AlicerAHitch
{
get => alicerAHitch;
set => SetProperty(ref alicerAHitch, value);
}
/// <summary>
/// 一体机切刀A运行
/// </summary>
public string alicerSlicerARun;
public string AlicerSlicerARun
{
get => alicerSlicerARun;
set => SetProperty(ref alicerSlicerARun, value);
}
/// <summary>
/// 一体机切刀A故障
/// </summary>
public string alicerSlicerAHitch;
public string AlicerSlicerAHitch
{
get => alicerSlicerAHitch;
set => SetProperty(ref alicerSlicerAHitch, value);
}
/// <summary>
/// 一体机油泵A运行
/// </summary>
public string alicerOilPumpARun;
public string AlicerOilPumpARun
{
get => alicerOilPumpARun;
set => SetProperty(ref alicerOilPumpARun, value);
}
/// <summary>
/// 一体机油泵A故障
/// </summary>
public string alicerOilPumpAHitch;
public string AlicerOilPumpAHitch
{
get => alicerOilPumpAHitch;
set => SetProperty(ref alicerOilPumpAHitch, value);
}
/// <summary>
/// 一体机B运行
/// </summary>
public string alicerBRun;
public string AlicerBRun
{
get => alicerBRun;
set => SetProperty(ref alicerBRun, value);
}
/// <summary>
/// 一体机B故障
/// </summary>
public string alicerBHitch;
public string AlicerBHitch
{
get => alicerBHitch;
set => SetProperty(ref alicerBHitch, value);
}
/// <summary>
/// 一体机切刀B运行
/// </summary>
public string alicerSlicerBRun;
public string AlicerSlicerBRun
{
get => alicerSlicerBRun;
set => SetProperty(ref alicerSlicerBRun, value);
}
/// <summary>
/// 一体机切刀B故障
/// </summary>
public string alicerSlicerBHitch;
public string AlicerSlicerBHitch
{
get => alicerSlicerBHitch;
set => SetProperty(ref alicerSlicerBHitch, value);
}
#endregion
}
}