public override void OnReadFromXmlNode(IXmlCodeReader serializer, XmlNode node) { base.OnReadFromXmlNode(serializer, node); object v; if (XmlSerialization.ReadValueFromChildNode(node, XML_RelativePosition, out v)) { if (_relativePosition == null) { _relativePosition = new RelativePosition(this, 20, 20, true, true); } _relativePosition.Location = (Point)v; XmlNode nd = node.SelectSingleNode(XML_RelativePosition); _relativePosition.IsXto0 = XmlSerialization.GetAttributeBool(nd, "xTo0", true); _relativePosition.IsYto0 = XmlSerialization.GetAttributeBool(nd, "yTo0", true); } }
protected override void OnLoad(XmlNode node) { object v; string s; _value = XmlSerialization.GetAttribute(node, XmlSerialization.XMLATT_NAME); if (string.IsNullOrEmpty(_value)) { _value = "_"; } _subscript = XmlSerialization.GetAttribute(node, "subscript"); _isInPort = XmlSerialization.GetAttributeBool(node, "asInport"); s = XmlSerialization.GetAttribute(node, "typeDefined"); if (!string.IsNullOrEmpty(s)) { if (string.Compare(s, "true", StringComparison.OrdinalIgnoreCase) == 0) { _typeDefined = true; } } s = XmlSerialization.GetAttribute(node, XmlSerialization.XMLATT_ID); if (!string.IsNullOrEmpty(s)) { _id = Convert.ToUInt32(s); } v = XmlSerialization.ReadFromChildXmlNode(GetReader(), node, "ValueType"); if (v != null) { _dataType = (RaisDataType)v; } else { _dataType = new RaisDataType(); _dataType.LibType = typeof(double); } LoadPorts(node); }
protected override void OnLoad(XmlNode node) { useParenthesis = XmlSerialization.GetAttributeBool(node, XMLATT_USEPARENTHESIS); }