示例#1
0
 public override void Unregister(RegistrationContext context)
 {
     context.RemoveKey(string.Format(CultureInfo.InvariantCulture, "{0}\\{1}", "OutputWindow", OutputWindowId.ToString("B")));
 }
示例#2
0
        public override void Register(RegistrationContext context)
        {
            Key childKey = null;

            try
            {
                childKey = context.CreateKey(string.Format(CultureInfo.InvariantCulture, "{0}\\{1}", "OutputWindow", OutputWindowId.ToString("B")));

                childKey.SetValue("", ResourceId);
                childKey.SetValue("Package", context.ComponentType.GUID.ToString("B"));
                if (!string.IsNullOrEmpty(Name))
                {
                    childKey.SetValue("Name", Name);
                }

                childKey.SetValue("InitiallyInvisible", InitiallyInvisible ? 1 : 0);
                childKey.SetValue("ClearWithSolution", ClearWithSolution ? 1 : 0);
            }
            finally
            {
                if (childKey != null)
                {
                    childKey.Close();
                }
            }
        }