예제 #1
0
 public static void Close()
 {
     if (reader != null)
     {
         reader.OnMessageNotificationReceived -= new Invengo.NetAPI.Core.MessageNotificationReceivedHandle(reader_OnMessageNotificationReceived);
         reader.Disconnect();
     }
 }
예제 #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 = "断开连接";
 }
예제 #3
0
파일: Form1.cs 프로젝트: Pablini/mVengo
        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";
        }