Esempio n. 1
0
 private void Write(RectInt16 rectInt16, XmlElement node)
 {
     node.SetInt16("Top", rectInt16.Top);
     node.SetInt16("Bottom", rectInt16.Bottom);
     node.SetInt16("Right", rectInt16.Right);
     node.SetInt16("Left", rectInt16.Left);
 }
Esempio n. 2
0
        private RectInt16[] ReadRects(XmlElement node)
        {
            if (node == null)
            {
                return(null);
            }

            var result = new List <RectInt16>(node.ChildNodes.Count);

            foreach (XmlElement child in node)
            {
                RectInt16 rectInt16 = new RectInt16
                {
                    Top    = child.GetInt16("Top"),
                    Bottom = child.GetInt16("Bottom"),
                    Right  = child.GetInt16("Right"),
                    Left   = child.GetInt16("Left")
                };
                result.Add(rectInt16);
            }
            return(result.ToArray());
        }