示例#1
0
        public static ISOTime ReadXML(XmlNode node)
        {
            ISOTime time = new ISOTime();

            time.Start    = node.GetXmlNodeValueAsNullableDateTime("@A");
            time.Stop     = node.GetXmlNodeValueAsNullableDateTime("@B");
            time.Duration = node.GetXmlNodeValueAsNullableUInt("@C");
            time.TypeInt  = node.GetXmlNodeValueAsInt("@D");

            time.HasStart    = node.IsAttributePresent("A");
            time.HasStop     = node.IsAttributePresent("B");
            time.HasDuration = node.IsAttributePresent("C");
            time.HasType     = node.IsAttributePresent("D");

            XmlNodeList ptnNodes = node.SelectNodes("PTN");

            if (ptnNodes != null)
            {
                time.Positions.AddRange(ISOPosition.ReadXML(ptnNodes));
            }

            XmlNodeList dlvNodes = node.SelectNodes("DLV");

            if (dlvNodes != null)
            {
                time.DataLogValues.AddRange(ISODataLogValue.ReadXML(dlvNodes));
            }

            return(time);
        }
示例#2
0
        public static List <ISOPosition> ReadXML(XmlNodeList nodes)
        {
            List <ISOPosition> items = new List <ISOPosition>();

            foreach (XmlNode node in nodes)
            {
                items.Add(ISOPosition.ReadXML(node));
            }
            return(items);
        }
示例#3
0
        public static ISOAllocationStamp ReadXML(XmlNode node)
        {
            if (node == null)
            {
                return(null);
            }

            ISOAllocationStamp item = new ISOAllocationStamp();

            item.Start    = node.GetXmlNodeValueAsNullableDateTime("@A");
            item.Stop     = node.GetXmlNodeValueAsNullableDateTime("@B");
            item.Duration = node.GetXmlNodeValueAsNullableUInt("@C");
            item.TypeInt  = node.GetXmlNodeValueAsInt("@D");

            XmlNodeList ptnNodes = node.SelectNodes("PTN");

            if (ptnNodes != null)
            {
                item.Positions.AddRange(ISOPosition.ReadXML(ptnNodes));
            }

            return(item);
        }