Regex rxIP = new Regex(@"^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}$"); //For IP Address validation public frmSettings(CSL.CS461_HL_API reader, CSL.CSL_Settings settings) { s = settings; InitializeComponent(); cbLogLevel.Items.Add("Disable"); cbLogLevel.Items.Add("Info"); cbLogLevel.Items.Add("Verbose"); cbModProfile.Items.Add("Profile0"); cbModProfile.Items.Add("Profile1"); cbModProfile.Items.Add("Profile2"); cbModProfile.Items.Add("Profile3"); cbModProfile.Items.Add("Profile4"); cbDuplicateEliminationMethod.Items.Add("Autonomous Time Trigger"); cbDuplicateEliminationMethod.Items.Add("Polling Trigger by Client"); cbSearchMode.Items.Add("Default"); cbSearchMode.Items.Add("Single Target Large Population Inventory"); cbRxSensitivity.Items.Add("Maximum sensitivity"); cbRxSensitivity.Items.Add("Variable sensitivity"); cbAnt1Pwr.BeginUpdate(); cbAnt2Pwr.BeginUpdate(); cbAnt3Pwr.BeginUpdate(); cbAnt4Pwr.BeginUpdate(); for (double d = 15.00; d <= 30.00; d += 0.25) { cbAnt1Pwr.Items.Add(d.ToString("N2")); cbAnt2Pwr.Items.Add(d.ToString("N2")); cbAnt3Pwr.Items.Add(d.ToString("N2")); cbAnt4Pwr.Items.Add(d.ToString("N2")); } cbAnt1Pwr.EndUpdate(); cbAnt2Pwr.EndUpdate(); cbAnt3Pwr.EndUpdate(); cbAnt4Pwr.EndUpdate(); cbAnt1RSSI.BeginUpdate(); cbAnt2RSSI.BeginUpdate(); cbAnt3RSSI.BeginUpdate(); cbAnt4RSSI.BeginUpdate(); for (int i = -70; i <= -30.00; i++) { cbAnt1RSSI.Items.Add(i.ToString()); cbAnt2RSSI.Items.Add(i.ToString()); cbAnt3RSSI.Items.Add(i.ToString()); cbAnt4RSSI.Items.Add(i.ToString()); } cbAnt1RSSI.EndUpdate(); cbAnt2RSSI.EndUpdate(); cbAnt3RSSI.EndUpdate(); cbAnt4RSSI.EndUpdate(); cbTagICModel.BeginUpdate(); cbTagICModel.Items.Add("GenericTID32"); cbTagICModel.Items.Add("GenericTID64"); cbTagICModel.Items.Add("Monza"); cbTagICModel.Items.Add("Monaco"); cbTagICModel.Items.Add("Monza ID"); cbTagICModel.Items.Add("NXP"); cbTagICModel.EndUpdate(); cbMemoryBanks.BeginUpdate(); cbMemoryBanks.Items.Add("None"); cbMemoryBanks.Items.Add("Bank0"); cbMemoryBanks.Items.Add("Bank2"); cbMemoryBanks.Items.Add("Bank3"); cbMemoryBanks.EndUpdate(); cbAntennaPortScheme.BeginUpdate(); cbAntennaPortScheme.Items.Add("Combined"); cbAntennaPortScheme.Items.Add("Separated"); cbAntennaPortScheme.EndUpdate(); IPHostEntry he = Dns.GetHostEntry(System.Environment.MachineName); for (int i = 0; i < he.AddressList.Length; i++) { cbLocalIP.Items.Add(he.AddressList[i].ToString()); } }