private void InitializeCardTypeList(SAMPLE_TYPE sampleType) { bool first = true; string cardType = string.Empty; try { Cursor.Current = Cursors.WaitCursor; if (_cardTypeList == null) { return; } for (int i = 0; i < _cardTypeList.Count; i++) { cardType = _cardTypeList[i].ToString(); if (cardType.ToLower().Contains("custom")) { this.cboCardType.Items.Add(cardType); } else { switch (sampleType) { case SAMPLE_TYPE.SMART_CARD: AddSmartCardType(ref cboCardType, cardType, ref first); break; case SAMPLE_TYPE.MAG: AddMagneticCardType(ref cboCardType, cardType, ref first); break; case SAMPLE_TYPE.PRINTING: AddPrintCardType(ref cboCardType, cardType, ref first); break; } } } } catch (Exception ex) { MessageBox.Show("InitializeCardTypeList threw exception: " + ex.Message); } finally { Cursor.Current = Cursors.Default; } }
private void InitializeCardListForMagneticTests(SAMPLE_TYPE sampleType) { try { cboCardType.Items.Clear(); InitializeCardTypeList(sampleType); _cardTypes = "Mag"; EnableSrcDest(true); } catch (Exception ex) { MessageBox.Show("InitializeCardListForMagneticTests threw exception: " + ex.Message); } }
private void InitializeCardListForPrintingTests(SAMPLE_TYPE sampleType) { try { if (_cardTypes != "Print") { cboCardType.Items.Clear(); InitializeCardTypeList(); _cardTypes = "Print"; } } catch (Exception ex) { MessageBox.Show("InitializeCardListForPrintingTests threw exception: " + ex.Message); } }
// Initializes cboCardType combo box // from the _cardTypess ArrayList based on sample type // -------------------------------------------------------------------------------------------------- private void cboCardTypeInit(SAMPLE_TYPE sampleType) { cboCardType.Items.Clear(); InitializeCardTypeList(sampleType); }