Esempio n. 1
0
 public static void Close()
 {
     if (reader != null)
     {
         reader.OnMessageNotificationReceived -= new Invengo.NetAPI.Core.MessageNotificationReceivedHandle(reader_OnMessageNotificationReceived);
         reader.Disconnect();
     }
 }
Esempio n. 2
0
 // 断开连接
 private void btnDisconn_Click(object sender, EventArgs e)
 {
     if (reader != null)
     {
         reader.OnMessageNotificationReceived -= new Invengo.NetAPI.Core.MessageNotificationReceivedHandle(reader_OnMessageNotificationReceived);
         reader.Disconnect();
     }
     changeCtrlEnable("disconn");
     lblMsg.Text = "断开连接";
 }
Esempio n. 3
0
        private void btn_Disconnect_Click(object sender, EventArgs e)
        {
            if (reader != null)
            {
                reader.OnMessageNotificationReceived -= new Invengo.NetAPI.Core.MessageNotificationReceivedHandle(reader_OnMessageNotificationReceived);
                reader.Disconnect();
                btn_Disconnect.Enabled = false;
                btn_Connect.Enabled    = true;
                btn_ReadEPC.Enabled    = false;
                changeCtrlEnable("disconn");

                // MQTT Disconnect
                client.Disconnect();
            }
            lbl_msg.Text = "disconn";
        }