private void cmbCarbinetIndex_SelectedIndexChanged(object sender, EventArgs e) { this.ClearListenerAndStopRunning(); this.ClearControls(); this.current_helper = helperList[this.cmbCarbinetIndex.SelectedIndex]; this.current_helper.start(this); }
void initialHelperList() { EpcProductHelper helper1 = new EpcProductHelper(this.listening_port1); this.helperList.Add(helper1); EpcProductHelper helper2 = new EpcProductHelper(this.listening_port2); this.helperList.Add(helper2); EpcProductHelper helper3 = new EpcProductHelper(this.listening_port3); this.helperList.Add(helper3); EpcProductHelper helper4 = new EpcProductHelper(this.listening_port4); this.helperList.Add(helper4); }