using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEA_Comm.ItemDB; namespace WIDESEA_Comm.DBItem { public partial class MachineDB { public event Action OnReadSignal; public string R_Name { get; set; } /// /// SN /// public string R_o_wp_id { get; set; } /// /// 开始时间 /// public DateTime R_o_mach_start_time { get; set; } /// /// 完成时间 /// public DateTime R_o_mach_finish_time { get; set; } /// /// 操作人 /// public string R_o_operator { get; set; } /// /// 去向 /// public string R_o_shift { get; set; } /// /// 质检状态 0:未定义,1:OK,2:NG /// public short R_o_wp_status { get; set; } /// /// 结果 /// public short R_o_result { get; set; } /// /// 错误代码 /// public short R_o_error_code { get; set; } public short R_o_substation { get; set; } public string R_o_value_result_real_1 { get; set; } public string R_o_value_result_real_2 { get; set; } public string R_o_value_result_real_3 { get; set; } public string R_o_value_result_real_4 { get; set; } public bool R_o_value_result_bool { get; set; } public short oi_on { get; set; } public short R_oi_on { get { return oi_on; } set { if (value == 1 && R_Name.Contains("视觉检测")) ReadSignal(OperationType.OperationType_Record, this); else if (value == 1 && R_Name.Contains("链条机")) ReadSignal(OperationType.OperationType_Processor, this); oi_on = value; } } public void ReadSignal(string type, MachineDB reader) { Task.Run(() => { OnReadSignal?.Invoke(type, reader); }); } } }