using MegaRobo.C00225155.Entities; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Media.Animation; using System.Xml.Serialization; namespace Common { public class StationProperty { private CancellationTokenSource cancellation = new CancellationTokenSource(); /// /// 工站线程取消标志 /// public CancellationTokenSource cancellationToken { get { return cancellation; } set { cancellation = value; } } /// /// 取消 暂停标志 /// public ManualResetEvent ManualResetEvent { get; set; } = new ManualResetEvent(true); //private Task stationtask; //public Task stationTask //{ // get { return stationtask; } // set { stationtask = value; } //} private int stationnum; /// /// 工站编号 /// public int StationNum { get { return stationnum; } set { stationnum = value; } } private string stationname = string.Empty; public string StationName { get { return stationname; } set { stationname = value; } } /// /// 是否启动按钮触发 /// public bool bStartButtonTrigger = false; /// /// 是否停止按钮触发 /// public bool bStopButtonTrigger = false; /// /// 是否复位按钮触发 /// public bool bResetButtonTrigger = false; /// /// 工站是否运行结束 /// public bool bRunFinish = false; /// /// 工站是否已经复位,只有复位过才能启动 /// public bool bHaveReset = false; /// /// 工站计时CT /// public Stopwatch CTWatch = new Stopwatch(); public DeviceStatus deviceStatus = DeviceStatus.Idel; /// /// 阻塞信号集合 /// public ConcurrentDictionary ObstructFlagList { get; set; } = new ConcurrentDictionary(); //private CancellationTokenSource cancellationUpDn = new CancellationTokenSource(); ///// ///// 上下工装线程取消标志(不控制工站线程) ///// //public CancellationTokenSource cancellationTokenUpDn //{ // get { return cancellationUpDn; } // set { cancellationUpDn = value; } //} } }