Ejemplo n.º 1
0
        public static void UnregisterClass(Type t)
        {
            CustomToolAttribute customToolAttribute = getCustomToolAttribute(t);

            foreach (var k in GetKeyNames(CSharpCategoryGuid, customToolAttribute.Name))
            {
                Registry.LocalMachine.DeleteSubKey(k, false);
            }
        }
Ejemplo n.º 2
0
        public static void RegisterClass(Type t)
        {
            GuidAttribute       guidAttribute       = getGuidAttribute(t);
            CustomToolAttribute customToolAttribute = getCustomToolAttribute(t);

            foreach (var k in GetKeyNames(CSharpCategoryGuid, customToolAttribute.Name))
            {
                using (RegistryKey key = Registry.LocalMachine.CreateSubKey(k))
                {
                    key.SetValue("", customToolAttribute.Description);
                    key.SetValue("CLSID", "{" + guidAttribute.Value + "}");
                    key.SetValue("GeneratesDesignTimeSource", 1);
                }
            }
        }