Esempio n. 1
0
        public override void InitByXml(System.Xml.Linq.XElement xml)
        {
            string att = null;

            if (xml.Attribute("angle") != null)
            {
                att = xml.Attribute("angle").Value;
                if (!String.IsNullOrEmpty(att))
                {
                    _angle = float.Parse(att);
                }
            }
            if (xml.Attribute("size") != null)
            {
                _size = (SizeF)LayoutFromFile.Base64StringToObject(xml.Attribute("size").Value);
            }
            if (xml.Attribute("location") != null)
            {
                _location = (PointF)LayoutFromFile.Base64StringToObject(xml.Attribute("location").Value);
            }
            if (xml.Attribute("isdoubleborderline") != null)
            {
                att = xml.Attribute("isdoubleborderline").Value;
                if (att != null)
                {
                    _isDoubleBorderLine = bool.Parse(att);
                }
            }
            if (xml.Attribute("interlineSize") != null)
            {
                _inSize = (SizeF)LayoutFromFile.Base64StringToObject(xml.Attribute("interlineSize").Value);
            }
            base.InitByXml(xml);
        }
Esempio n. 2
0
 public override void InitByXml(System.Xml.Linq.XElement xml)
 {
     if (xml.Attribute("size") != null)
     {
         _size = (SizeF)LayoutFromFile.Base64StringToObject(xml.Attribute("size").Value);
     }
     if (xml.Attribute("location") != null)
     {
         _location = (PointF)LayoutFromFile.Base64StringToObject(xml.Attribute("location").Value);
     }
     base.InitByXml(xml);
 }
Esempio n. 3
0
        public override void InitByXml(System.Xml.Linq.XElement xml)
        {
            if (xml.Attribute("unit") != null)
            {
                string s = xml.Attribute("unit").Value;
                switch (s.ToLower())
                {
                case "pixel":
                    _unit = enumLayoutUnit.Pixel;
                    break;

                case "centimeter":
                    _unit = enumLayoutUnit.Centimeter;
                    break;
                }
            }
            if (xml.Attribute("size") != null)
            {
                _size = (SizeF)LayoutFromFile.Base64StringToObject(xml.Attribute("size").Value);
            }
            base.InitByXml(xml);
        }