// Methods public object Transform(object value) { int idxData; int nGeneration; int idx = (int)value; ListUtility.GetWrappedIndex(idx, this.m_cItems, out idxData, out nGeneration); return(idxData); }
protected static int FindContentItem(IList listContent, string strSearch) { if (!ListUtility.IsNullOrEmpty(listContent)) { for (int i = 0; i < listContent.Count; i++) { object obj2 = listContent[i]; bool flag = false; IBrowseGroup group = obj2 as IBrowseGroup; if (group != null) { if (!string.IsNullOrEmpty(group.Description)) { flag = IsMatchForSearchString(group.Description, strSearch); } } else { string description; ICommand command = obj2 as ICommand; if (command != null) { description = command.Description; } else { description = string.Empty; } if (!string.IsNullOrEmpty(description)) { flag = IsMatchForSearchString(description, strSearch); } } if (flag) { return(i); } } } return(-1); }