public void JoinMessage(string text) { if (!SentMessages.Contains(Step)) { NewInstructionTextByText?.Invoke(CycleID, text); } }
public void JoinTraceErrorDescription(int errorCode) { if (!SentMessages.Contains(Step)) { GetTraceErrorDescription?.Invoke(CycleID, errorCode); } }
public void StartRFID(string name) { if (!SentMessages.Contains(Step)) { TriggerRFID?.Invoke(name, true); } }
public void EndMessage() { if (!SentMessages.Contains(Step)) { SentMessages.Add(Step); EndOfInstructionText?.Invoke(CycleID); } }
public void StopRFID(string name) { if (!SentMessages.Contains(Step)) { TriggerRFID?.Invoke(name, false); SentMessages.Remove(Step); } }
public void ShowPotiResultPicture(Dictionary <EngineData.AI, int> analogResults = null, Dictionary <EngineData.DI, int> digiResults = null, string resourceName = null) { if (!SentMessages.Contains(Step)) { ShowPotiPicture?.Invoke(CycleId, analogResults, digiResults, resourceName); SentMessages.Add(Step); HMI.PanelStatus(EngineData.Screens.ImageMachineResults); } }
public void StopScanner(string name) { if (!SentMessages.Contains(Step)) { TriggerScanner?.Invoke(name, false); SentMessages.Remove(Step); CounterTimeout = 0; } }
public bool StartScanner(string name) { if (!SentMessages.Contains(Step)) { if (CounterTimeout < 100) { TriggerScanner?.Invoke(name, true); SentMessages.Add(Step); CounterTimeout++; } else { CounterTimeout = 0; return(false); } return(true); } CounterTimeout = 0; return(false); }
public void SendMessage(ZenBotMessage message) { if (SentMessages.Contains(message)) { message.Message = LoopBreaker.GetRandomMessage(); } SentMessages.Add(message); var answer = Connection.SendMessage(message.Message).Result; ReceivedAnswers.Add(new ZenBotMessage() { Message = answer }); if (ReceivedAnswers.Count > QueueSize) { ReceivedAnswers.RemoveAt(0); } if (SentMessages.Count > QueueSize) { SentMessages.RemoveAt(0); } }