コード例 #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();
            }
        }