2
// <copyright see="prj:///doc/copyright.txt"/>
3
// <license see="prj:///doc/license.txt"/>
4
// <owner name="Oakland Software Incorporated" email="general@oaklandsoftware.com"/>
5
// <version>$Revision$</version>
13
namespace NoGoop.ObjBrowser.TreeNodes
16
internal class ComProgIdRootTreeNode : ComRootTreeNode
19
protected class ProgIdNode
21
internal BasicInfo _info;
22
internal String _progId;
26
// Used to hold the progId between ProcessChild() and SortKey()
27
protected String _sortKey;
29
internal ComProgIdRootTreeNode() : base()
31
SetPresInfo(PresentationMap.COM_FOLDER_APPID);
33
_baseKey = Windows.KeyClassRoot;
34
_progressName = "ProgId";
37
// Used to get the basic info that is used by this type
39
protected override Object ProcessChild(RegistryKey key,
43
// Eliminate the known keys and the file extensions
44
if (subKeyName.StartsWith(".") ||
45
subKeyName.Equals("CLSID") ||
46
subKeyName.Equals("CID") ||
47
subKeyName.Equals("AppId") ||
48
subKeyName.Equals("Interface") ||
49
subKeyName.Equals("TypeLib"))
52
ComClassInfo classInfo = null;
53
_sortKey = subKeyName;
55
ProgIdNode node = new ProgIdNode();
56
node._progId = _sortKey;
58
// See if there is a CLSID for this program id
59
RegistryKey clsIdKey =
60
key.OpenSubKey("CLSID");
63
String clsId = (String)clsIdKey.GetValue(null);
66
RegistryKey classKey =
67
Windows.KeyCLSID.OpenSubKey(clsId);
72
ComClassInfo.GetClassInfo(classKey, clsId);
73
node._info = classInfo;
74
classInfo.AddProgId(subKeyName);
79
// Don't bother with it unless it refers to a class
80
if (classInfo == null)
85
protected override Object GetSortKey(Object info)
90
// Allocates the correct type of node
91
protected override BrowserTreeNode AllocateChildNode(Object obj)
93
if (_progress != null)
94
_progress.UpdateProgress(1);
96
ProgIdNode progIdNode = (ProgIdNode)obj;
97
ComTypeTreeNode node = new ComTypeTreeNode(progIdNode._info,
99
node.IntermediateNodeTypes = null;
104
// Determines is this node has children
105
protected override bool HasChildren()
107
// Assume there are classes on the system
113
public override String GetName()
118
public override void GetDetailText()
120
base.GetDetailText();