private static ListViewItemWithGuid MapTypeToItemNoSubItem(Type type) { ListViewItemWithGuid item = new ListViewItemWithGuid(type.Name, type.GUID); item.Tag = type; return(item); }
private static IEnumerable <ListViewItemWithGuid> FormatProxyInstance(COMProxyInstance proxy) { foreach (var t in proxy.Entries.OrderBy(t => COMUtilities.DemangleWinRTName(t.Name))) { ListViewItemWithGuid item = new ListViewItemWithGuid(COMUtilities.DemangleWinRTName(t.Name), t.Iid); item.SubItems.Add(t.Iid.FormatGuid()); item.Tag = t; yield return(item); } }
private static IEnumerable <ListViewItemWithGuid> FormatProxyInstance(COMProxyInstance proxy) { foreach (COMProxyInstanceEntry t in proxy.Entries.OrderBy(t => t.Name)) { ListViewItemWithGuid item = new ListViewItemWithGuid(t.Name, t.Iid); item.SubItems.Add(t.Iid.FormatGuid()); item.Tag = t; yield return(item); } }
private void CopyGuid(object sender, GuidFormat copy_type) { ListView list = sender as ListView; if (list != null && list.SelectedItems.Count > 0) { ListViewItemWithGuid item = list.SelectedItems[0] as ListViewItemWithGuid; if (item != null) { COMUtilities.CopyGuidToClipboard(item.Guid, copy_type); } } }
private void CopyGuid(object sender, COMRegistryViewer.CopyGuidType copy_type) { ListView list = sender as ListView; if (list != null && list.SelectedItems.Count > 0) { ListViewItemWithGuid item = list.SelectedItems[0] as ListViewItemWithGuid; if (item != null) { COMRegistryViewer.CopyGuidToClipboard(item.Guid, copy_type); } } }
private static IEnumerable <ListViewItemWithGuid> FormatTypes(IEnumerable <Type> types, bool com_visible) { if (com_visible) { types = types.Where(t => Marshal.IsTypeVisibleFromCom(t)); } else { types = types.Where(t => Attribute.IsDefined(t, typeof(ComImportAttribute))); } foreach (Type t in types.OrderBy(t => t.Name)) { ListViewItemWithGuid item = new ListViewItemWithGuid(t.Name, t.GUID); item.SubItems.Add(t.GUID.FormatGuid()); item.Tag = t; yield return(item); } }