Ejemplo n.º 1
0
        public static object SystemConvertFromXml(XmlElement printRecord, Type type)
        {
            PrintRecord record   = new PrintRecord();
            XmlNode     currNode = printRecord.FirstChild;

            record.Job = (UIJob)UIJob.SystemConvertFromXml((XmlElement)currNode, typeof(UIJob));

            currNode = currNode.NextSibling;
            if (currNode == null)
            {
                return(record);
            }
            record.innerInkCounts = (List <InnerInkCount>)PubFunc.SystemConvertFromXml(currNode.OuterXml, typeof(List <InnerInkCount>));
            if (record.innerInkCounts != null)
            {
                foreach (var item in record.innerInkCounts)
                {
                    record.InkCount[item.Color] = item.Value;
                }
            }
            currNode = currNode.NextSibling;
            if (currNode == null)
            {
                return(record);
            }
            record.AllCopiesTime = (long)PubFunc.SystemConvertFromXml(currNode.OuterXml, typeof(long));
            currNode             = currNode.NextSibling;
            if (currNode == null)
            {
                return(record);
            }
            record.PrintedLength = (float)PubFunc.SystemConvertFromXml(currNode.OuterXml, typeof(float));
            currNode             = currNode.NextSibling;
            if (currNode == null)
            {
                return(record);
            }
            record.PrintedArea = (float)PubFunc.SystemConvertFromXml(currNode.OuterXml, typeof(float));
            currNode           = currNode.NextSibling;
            if (currNode == null)
            {
                return(record);
            }
            record.FXOrigin = (float)PubFunc.SystemConvertFromXml(currNode.OuterXml, typeof(float));
            currNode        = currNode.NextSibling;
            if (currNode == null)
            {
                return(record);
            }
            record.FYOrigin = (float)PubFunc.SystemConvertFromXml(currNode.OuterXml, typeof(float));
            currNode        = currNode.NextSibling;
            if (currNode == null)
            {
                return(record);
            }
            record.PrintedTileCount = (int)PubFunc.SystemConvertFromXml(currNode.OuterXml, typeof(int));
            return(record);
        }