void SearchTermTextBoxTextChanged(object sender, EventArgs e) { ElementSearcher srch = new ElementSearcher(); string searchWord = SearchTermTextBox.Text; if (searchWord.Length <= 0) { listView1.Items.Clear(); return; } List <ElementSearchItem> results = new List <ElementSearchItem>(); if (searchWord.Length > 1 && "{".Equals(searchWord.Substring(0, 1))) { ElementSearchItem element = srch.findByGuid(searchWord); results.Add(element); } else { results = srch.findByKeyword(searchWord); } listView1.Items.Clear(); foreach (ElementSearchItem elem in results) { ListViewItem item = new ListViewItem(getStringArrayFromVO(elem)); item.Tag = elem; listView1.Items.Add(item); } }
private static void outputConnDestClass(string objGuid, ElementSearcher elemSrch, Dictionary <string, ElementSearchItem> nameHash, StreamWriter sw) { ElementSearchItem elemSrcItem = elemSrch.findByGuid(objGuid); if (elemSrcItem != null) { string identifiedName = filterSpecialChar(elemSrcItem.elemName); if (!nameHash.ContainsKey(identifiedName)) { sw.WriteLine("class \"" + identifiedName + "\" " + getStereotypeStr(elemSrcItem.elemStereotype) + " {"); sw.WriteLine("}"); nameHash.Add(identifiedName, elemSrcItem); } } }