private void listboxCodeList_SelectedIndexChanged(object sender, EventArgs e) { int codeReaderIndex = listboxCodeList.SelectedIndex; CurrentCodeReader = CurrentVisionDevice.CodeReaders[codeReaderIndex]; DisableValueChangedEvent = true; UpdateCodeReaderToInterface(); DisableValueChangedEvent = false; }
private void btnRemoveCode_Click(object sender, EventArgs e) { if (CurrentCodeReader != null) { CurrentVisionDevice.CodeReaders.Remove(CurrentCodeReader); CurrentCodeReader = null; ListCodeReader = CurrentVisionDevice.ListCodeReaderName; listboxCodeList.DataSource = ListCodeReader; } }