~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to samples/ComponentInspector/ComponentInspector.Core/Src/Objects/ComAppInfo.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// <file>
 
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>
 
6
// </file>
 
7
 
 
8
using System;
 
9
using Microsoft.Win32;
 
10
 
 
11
namespace NoGoop.Obj
 
12
{
 
13
 
 
14
        internal class ComAppInfo : BasicInfo
 
15
        {
 
16
 
 
17
                public Type Type
 
18
                {
 
19
                        get
 
20
                                {
 
21
                                        return null;
 
22
                                }
 
23
                }
 
24
 
 
25
                internal ComAppInfo(RegistryKey classKey,
 
26
                                                        String guidStr) : 
 
27
                                base(classKey)
 
28
                {
 
29
                        _infoType = "ApplId";
 
30
 
 
31
                        // The AppId entries either use the GUID as their key
 
32
                        // and the value is the description, or the exe file
 
33
                        // is the key, and the Guid is found in the AppId value
 
34
                        String guidValueStr = (String)classKey.GetValue("AppID");
 
35
                        if (guidValueStr != null)
 
36
                        {
 
37
                                Name = guidStr;
 
38
                                InitGuid(guidValueStr, new Guid(guidValueStr));
 
39
                        }
 
40
                        else
 
41
                        {
 
42
                                String defValue = (String)classKey.GetValue(null);
 
43
                                if (defValue == null || defValue.Equals(""))
 
44
                                        Name = guidStr;
 
45
                                else
 
46
                                        DocString = defValue;
 
47
                                InitGuid(guidStr, new Guid(guidStr));
 
48
                        }
 
49
                }
 
50
 
 
51
 
 
52
                public override void GetDetailText()
 
53
                {
 
54
                        base.GetDetailText();
 
55
                }
 
56
 
 
57
                public override String ToString()
 
58
                {
 
59
                        return base.ToString();
 
60
                }
 
61
        }
 
62
}