private void comboBoxCommand_SelectedIndexChanged(object sender, EventArgs e) { if (comboBoxCommand.SelectedValue != null && dataBytes.Count > 0) { textBoxCommandDesc.Text = dbMgr.GetDeviceDescription(comboBoxDeviceAddress.SelectedValue.ToString(), comboBoxCommand.SelectedValue.ToString()); int Id = dbMgr.GetDeviceId(comboBoxDeviceAddress.SelectedValue.ToString(), comboBoxCommand.Text); object[] readByteData = dbMgr.ReadResponsePacketData(Id); for (int i = 0; i < dataBytes.Count; i++) { ((CustomByteData)dataBytes[i]).DataTypeTag = DataType.Address.ToString(); ((CustomByteData)dataBytes[i]).TxtDataDescription = ""; ((CustomByteData)dataBytes[i]).DataTag = ByteDataTag.EightBitSingle.ToString(); } for (int i = 0; i < readByteData.Length; i++) { object[] tempObject = (object[])(readByteData[i]); ((CustomByteData)dataBytes[i]).DataTypeTag = (string)tempObject[1]; ((CustomByteData)dataBytes[i]).TxtDataDescription = (string)tempObject[3]; ((CustomByteData)dataBytes[i]).DataTag = (string)tempObject[4]; } } else { textBoxCommandDesc.Text = ""; } }