示例#1
0
        static XmlElement encodeFilterGraph(XmlDocument doc, FilterGraph graph)
        {
#if TODO
            XmlElement graph_e = doc.CreateElement("graph");

            graph_e.SetAttribute("name", graph.getName());

            foreach (Filter f in graph.getFilters())
            {
                XmlElement filter_e = doc.CreateElement("filter");
                //XmlAttributeCollection attrs = new XmlAttributeCollection(filter_e);
                //attrs["type"] = f.getFilterType();

                XmlAttribute xmlAttrib = doc.CreateAttribute("type");
                xmlAttrib.Value = f.getFilterType();
                filter_e.Attributes.Append(xmlAttrib);

                Properties props = f.getProperties();
                foreach (Property i in props)
                {
                    filter_e.AppendChild(encodeProperty(doc, i));
                }

                graph_e.AppendChild(filter_e);
            }
            return(graph_e);
#endif
            throw new NotImplementedException();
        }
示例#2
0
        static XmlElement encodeFilterGraph(XmlDocument doc, FilterGraph graph)
        {
            #if TODO
            XmlElement graph_e = doc.CreateElement("graph");

            graph_e.SetAttribute("name", graph.getName());

            foreach (Filter f in graph.getFilters())
            {

                XmlElement filter_e = doc.CreateElement("filter");
                //XmlAttributeCollection attrs = new XmlAttributeCollection(filter_e);
                //attrs["type"] = f.getFilterType();

                XmlAttribute xmlAttrib = doc.CreateAttribute("type");
                xmlAttrib.Value = f.getFilterType();
                filter_e.Attributes.Append(xmlAttrib);

                Properties props = f.getProperties();
                foreach (Property i in props)
                {
                    filter_e.AppendChild(encodeProperty(doc, i));
                }

                graph_e.AppendChild(filter_e);
            }
            return graph_e;
            #endif
            throw new NotImplementedException();
        }