Ejemplo n.º 1
0
        public override void FromXml(XmlElement element)
        {
            for (int i = 0; i < element.ChildNodes.Count; i++)
            {
                XmlElement   child = (XmlElement)element.ChildNodes[i];
                PRectangleGs gs    = ((PRectangleGs)this.ChildElements[i]);
                string       m1    = child["m1"].InnerText;
                if (!string.IsNullOrEmpty(m1))
                {
                    gs.M1 = Convert.ToInt32(m1);
                }

                string m2 = child["m2"].InnerText;
                if (!string.IsNullOrEmpty(m2))
                {
                    gs.M2 = Convert.ToInt32(m2);
                }

                string s1 = child["s1"].InnerText;
                if (!string.IsNullOrEmpty(s1))
                {
                    gs.S1 = Convert.ToInt32(s1);
                }

                string s2 = child["s2"].InnerText;
                if (!string.IsNullOrEmpty(s2))
                {
                    gs.S2 = Convert.ToInt32(s2);
                }
            }
        }
Ejemplo n.º 2
0
 public PGs(int x, int y, int width, int height, string name, Document document)
     : base(x, y, width, height, name, document)
 {
     for (int i = 0; i < this.Document.WCount; i++)
     {
         PRectangleGs prt = new PRectangleGs(this.X + i * document.celWidht, this.Y, document.celWidht, this.Height, "", this.Document);
         this.ChildElements.Add(prt);
     }
 }