private void DisconnectReader() { this.isConnected = false; rfid.StopInventory(mComPort); rfid.DisconnectRadio(mComPort); }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { //如果仍在盘点,则关闭盘点 if (this.isInventory) { StopInventory(); } //关闭读写器连接 reader.DisconnectRadio(mComPort); }
public void disConnect() { if (mReaderType == READER_TYPE.READER_IMP) { mReaderIMP.Disconnect(); } if (mReaderType == READER_TYPE.READER_TM) { mReaderTM.Destroy(); } if (mReaderType == READER_TYPE.READER_DLX_PM) { mReaderDLXPM.DisconnectRadio(mComPort); } if (mReaderType == READER_TYPE.READER_XD_PM) { mReaderXDPM.CloseReader(); } }