/// <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(); } }
/// <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())); }
/// <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(); } }