Example #1
0
 private void onEthernetError(object sender, CommunicationStack.Net.DataModels.MsgPumpResults e)
 {
     this.Dispatcher.Invoke(() => {
         this.ui.IsBusy = false;
         App.ShowMsg(string.Format("{0} '{1}'", e.Code, e.ErrorString));
     });
 }
Example #2
0
        private void MsgPump_MsgPumpConnectResultEventHandler(object sender, CommunicationStack.Net.DataModels.MsgPumpResults results)
        {
            this.log.Info("MsgPump_MsgPumpConnectResultEvent", () =>
                          string.Format("Result:{0} - '{1}'", results.Code, results.ErrorString));
            this.OnEthernetConnectionAttemptCompleted?.Invoke(sender, results);


            //if (results.Code == CommunicationStack.Net.Enumerations.MsgPumpResultCode.Connected) {
            //    this.log.Info("MsgPump_MsgPumpConnectResultEvent", "************************ WE ARE CONNECTED ************************ ");
            //    //this.msgPump.WriteAsync("OpenDoor\r\n".ToAsciiByteArray());
            //    //this.msgPump.WriteAsync("CloseDoor\r\n".ToAsciiByteArray());
            //}
            //else {
            //    this.log.Info("MsgPump_MsgPumpConnectResultEvent",
            //        "************************ FAILED CONNECTION ************************ ");
            //    this.log.Info("MsgPump_MsgPumpConnectResultEvent", () =>
            //        string.Format("Error:{0} - '{1}'", results.Code, results.ErrorString));
            //}
        }