예제 #1
0
        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();
        }
예제 #2
0
        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();
        }