public static void AddIcon(string id, string name, string group, string icofile, string exec, int order, bool ShellEx, IcoListRegType t) { NamedPipeClientStream pipe = ConnectPipe(); if (pipe == null) { return; } IcoListData ico = new IcoListData(id, name, group, icofile, exec, order, ShellEx, t); ico.Action = IcoListAction.Add; XmlSerializer ser = new XmlSerializer(typeof(IcoListData)); ser.Serialize(pipe, ico); pipe.Flush(); pipe.Close(); }
public static void DeleteIcon(string ID, IcoListRegType Type) { NamedPipeClientStream pipe = ConnectPipe(); if (pipe == null) { return; } IcoListData ico = new IcoListData(); ico.Action = IcoListAction.Delete; ico.ID = ID; ico.Type = Type; XmlSerializer ser = new XmlSerializer(typeof(IcoListData)); ser.Serialize(pipe, ico); pipe.Flush(); pipe.Close(); }