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
{
///
/// 手自动切换的条件
///
public class AutoHandSwtichCondition : BindableBase
{
private bool _IsCanSwitch;
///
/// 是否可切换
///
public bool IsCanSwitch
{
get { return _IsCanSwitch; }
set { _IsCanSwitch = value; RaisePropertyChanged(); }
}
///
/// 全部报警地址
///
public string? AlarmAddress { get; set; } = "V3.0";
///
/// 报警结果
///
public OperateResult? AlarmStateResult { get; set; }
///
/// 手动状态地址
///
public string? HandStateAddress { get; set; } = "M0.0";
///
/// 手动状态结果
///
public OperateResult? HandStateResult { get; set; }
///
/// 汇总结果
///
///
///
///
public void SumResult()
{
if (AlarmStateResult!.IsSuccess && HandStateResult!.IsSuccess)
{
//IsCanSwitch = AlarmStateResult.Content==false && HandStateResult.Content==false;
IsCanSwitch = HandStateResult.Content==false;
//return IsCanSwitch;
}
}
}
}