private void connectionStatusChanged(object sender, BLE_ConnectStatusChangeInfo e)
 {
     this.Dispatcher.Invoke(() => {
         if (e.Status == BLE_ConnectStatus.Disconnected)
         {
             this.SetConnectState(false);
             this.writeControl.Reset();
             App.ShowMsg(e.Message);
         }
     });
 }
Beispiel #2
0
        private void BLEBluetooth_ConnectionStatusChanged(object sender, BLE_ConnectStatusChangeInfo e)
        {
            ErrReport report;

            WrapErr.ToErrReport(out report, 200058, "Failure on BLE_ConnectStatusChangeInfo", () => {
                e.Message = e.Status == BLE_ConnectStatus.Connected
                    ? this.GetText(MsgCode.Connected)
                    : this.GetText(MsgCode.Disconnected);
                this.BLE_ConnectionStatusChanged?.Invoke(sender, e);
            });
            this.RaiseIfException(report);
        }