private void buttonRFIDRead_Click(object sender, EventArgs e) { buttonRFIDRead.Enabled = false; var item = comboBoxRFIDs.SelectedValue as RFIDReader; if (item != null) { var data = item.ReadBytes(); if (data != null) { var str = RFIDReader.BytesToHexString(data); for (int i = 2; i < str.Length; i += 3) { str = str.Insert(i, i == 65 ? "+" : "_"); } Data = RFIDData.Deserialize(data); textBoxRFIDData.Text = str; comboBoxWorkpiece.SelectedValue = Data.Workpiece; comboBoxClean.SelectedValue = Data.Clean; comboBoxGauge.SelectedValue = Data.Gauge; comboBoxAssemble.SelectedValue = Data.Assemble; } } buttonRFIDRead.Enabled = true; }