更新了Tag的字段属性和Can配置的修复
This commit is contained in:
64
CapMachine.Wpf/Models/AutoHandSwtichCondition.cs
Normal file
64
CapMachine.Wpf/Models/AutoHandSwtichCondition.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using HslCommunication;
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CapMachine.Wpf.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 手自动切换的条件
|
||||
/// </summary>
|
||||
public class AutoHandSwtichCondition : BindableBase
|
||||
{
|
||||
private bool _IsCanSwitch;
|
||||
/// <summary>
|
||||
/// 是否可切换
|
||||
/// </summary>
|
||||
public bool IsCanSwitch
|
||||
{
|
||||
get { return _IsCanSwitch; }
|
||||
set { _IsCanSwitch = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 全部报警地址
|
||||
/// </summary>
|
||||
public string? AlarmAddress { get; set; } = "V3.0";
|
||||
|
||||
/// <summary>
|
||||
/// 报警结果
|
||||
/// </summary>
|
||||
public OperateResult<bool>? AlarmStateResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 手动状态地址
|
||||
/// </summary>
|
||||
public string? HandStateAddress { get; set; } = "M0.0";
|
||||
|
||||
/// <summary>
|
||||
/// 手动状态结果
|
||||
/// </summary>
|
||||
public OperateResult<bool>? HandStateResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇总结果
|
||||
/// </summary>
|
||||
/// <param name="AlarmState"></param>
|
||||
/// <param name="HandState"></param>
|
||||
/// <returns></returns>
|
||||
public void SumResult()
|
||||
{
|
||||
if (AlarmStateResult!.IsSuccess && HandStateResult!.IsSuccess)
|
||||
{
|
||||
//IsCanSwitch = AlarmStateResult.Content==false && HandStateResult.Content==false;
|
||||
IsCanSwitch = HandStateResult.Content==false;
|
||||
//return IsCanSwitch;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ namespace CapMachine.Wpf.Models.Tag
|
||||
/// <summary>
|
||||
/// 工程值 Mv
|
||||
/// </summary>
|
||||
short EngMvValue { get; set; }
|
||||
double EngMvValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工程值的字符串 Mv
|
||||
|
||||
@@ -235,11 +235,11 @@ namespace CapMachine.Wpf.Models.Tag
|
||||
}
|
||||
|
||||
|
||||
private short _EngMvValue;
|
||||
private double _EngMvValue;
|
||||
/// <summary>
|
||||
/// 工程值 MV
|
||||
/// </summary>
|
||||
public short EngMvValue
|
||||
public double EngMvValue
|
||||
{
|
||||
get { return _EngMvValue; }
|
||||
set
|
||||
|
||||
Reference in New Issue
Block a user