示例#1
0
        public ProcessingXMLInfo parse()
        {
            ProcessingXMLInfo pinfo = new ProcessingXMLInfo();
            XmlDocument       doc   = new XmlDocument();

            doc.LoadXml(this.processingXML);
            XmlNodeList algos = doc.SelectNodes("//Algo");

            foreach (XmlNode algo in algos)
            {
                switch (algo.Attributes["id"].Value)
                {
                case "10009":
                    pinfo.Rotate180Enabled = algo.Attributes["enabled"].Value;
                    break;

                case "10010":
                    pinfo.Rotate90REnabled = algo.Attributes["enabled"].Value;
                    break;

                case "20045":
                    pinfo.BrightnessEnabled = algo.Attributes["enabled"].Value;
                    pinfo.BrightnessValue   = algo.Attributes["value"].Value;
                    break;

                case "20046":
                    pinfo.ContrastEnabled = algo.Attributes["enabled"].Value;
                    pinfo.ContrastValue   = algo.Attributes["value"].Value;
                    break;
                }
            }
            return(pinfo);
        }
 public ProcessingXMLInfo parse()
 {
     ProcessingXMLInfo pinfo = new ProcessingXMLInfo();
     XmlDocument doc = new XmlDocument();
     doc.LoadXml(this.processingXML);
     XmlNodeList algos = doc.SelectNodes("//Algo");
     foreach (XmlNode algo in algos)
     {
         switch (algo.Attributes["id"].Value)
         {
             case "10009":
                 pinfo.Rotate180Enabled = algo.Attributes["enabled"].Value;
                 break;
             case "10010":
                 pinfo.Rotate90REnabled = algo.Attributes["enabled"].Value;
                 break;
             case "20045":
                 pinfo.BrightnessEnabled = algo.Attributes["enabled"].Value;
                 pinfo.BrightnessValue = algo.Attributes["value"].Value;
                 break;
             case "20046":
                 pinfo.ContrastEnabled = algo.Attributes["enabled"].Value;
                 pinfo.ContrastValue = algo.Attributes["value"].Value;
                 break;
         }
     }
     return pinfo;
 }