private void FillModels() { List <string> listmodels = new List <string>(); List <ClSTtype> listmodeldata = new List <ClSTtype>(); ViewerUtils.ReadModelLstFile(m_strpathlistfile, ref listmodeldata); foreach (ClSTtype data in listmodeldata) { if (listmodels.Contains(data.strMod1) == false) { listmodels.Add(data.strMod1); } } foreach (string strModel in listmodels) { if (this.cbModelName_.Items.Contains(strModel) == false) { this.cbModelName_.Items.Add(strModel); } } if (this.cbModelName_.Items.Count > 0) { this.cbModelName_.SelectedIndex = 0; } }
private void FillLabel(string strModelName) { List <string> listLabels = new List <string>(); List <ClSTtype> listmodeldata = new List <ClSTtype>(); ViewerUtils.ReadModelLstFile(m_strpathlistfile, ref listmodeldata); foreach (ClSTtype data in listmodeldata) { if (data.strMod1.Trim() == strModelName.Trim()) { listLabels.Add(data.strStg); } } this.lbStringLebels_.Items.Clear(); foreach (string strLabel in listLabels) { if (strLabel.Trim() != "") { if (this.lbStringLebels_.Items.Contains(strLabel) == false) { this.lbStringLebels_.Items.Add(strLabel); } } } }