示例#1
0
        public void ParseManifest(MemoryStream stream)
        {
            XmlDocument xd = new XmlDocument();

            stream.Seek(0, SeekOrigin.Begin);
            xd.Load(stream);
            XmlNode rootnode = xd.ChildNodes[1];

            if (rootnode.Name != "CWPluginManifest")
            {
                return;
            }

            foreach (XmlNode xnode in rootnode.ChildNodes)
            {
                switch (xnode.Name)
                {
                case "PluginInfo": PluginInfo.Load(xnode); break;

                case "UserImages":
                    LoadFileList(xnode, "Image", mImageFiles);
                    break;

                case "MachineConfigs":
                    LoadFileList(xnode, "MachineConfig", mMachineConfigFiles);
                    break;

                case "SliceProfile":
                    LoadFileList(xnode, "SliceProfile", mSliceConfigFiles);
                    break;
                }
            }
        }
示例#2
0
        void ParseManifest(MemoryStream stream)
        {
            XmlDocument xd = new XmlDocument();

            xd.Load(stream);
            XmlNode rootnode = xd.ChildNodes[1];

            if (rootnode.Name != "CWPluginManifest")
            {
                return;
            }

            foreach (XmlNode xnode in rootnode.ChildNodes)
            {
                switch (xnode.Name)
                {
                case "PluginInfo": PluginInfo.Load(xnode); break;
                }
            }
        }