Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="icon"></param>
        protected void SetDefaultIcon(ProgramIcon icon)
        {
            if (!this.Exists)
            {
                throw new Exception("Extension does not exist");
            }

            if (icon != ProgramIcon.None)
            {
                registryWrapper.Write(this.progId, "DefaultIcon", icon.ToString());

                ShellNotification.NotifyOfChange();
            }
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        protected ProgramIcon GetDefaultIcon()
        {
            if (!this.Exists)
            {
                throw new Exception("Extension does not exist");
            }

            object val = registryWrapper.Read(this.progId + "\\DefaultIcon", "");

            if (val == null)
            {
                return(ProgramIcon.None);
            }

            return(ProgramIcon.Parse(val.ToString()));
        }