예제 #1
0
        /// <summary>
        /// </summary>
        /// <param name="icon"></param>
        protected void SetDefaultIcon(ProgramIcon icon)
        {
            if (!Exists)
            {
                throw new Exception("Extension does not exist");
            }

            if (icon != ProgramIcon.None)
            {
                _registryWrapper.Write(ProgId, "DefaultIcon", icon.ToString());

                ShellNotification.NotifyOfChange();
            }
        }
예제 #2
0
        /// <summary>
        /// </summary>
        /// <returns></returns>
        protected ProgramIcon GetDefaultIcon()
        {
            if (!Exists)
            {
                throw new Exception("Extension does not exist");
            }

            var val = _registryWrapper.Read(ProgId + "\\DefaultIcon", "");

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

            return(ProgramIcon.Parse(val.ToString()));
        }
예제 #3
0
        /// <summary>
        /// </summary>
        /// <param name="icon"></param>
        protected void SetDefaultIcon(ProgramIcon icon)
        {
            if (!Exists)
                throw new Exception("Extension does not exist");

            if (icon != ProgramIcon.None)
            {
                _registryWrapper.Write(ProgId, "DefaultIcon", icon.ToString());

                ShellNotification.NotifyOfChange();
            }
        }