Exemplo n.º 1
0
 public void Update(module element)
 {
     if (element.m_cmd != null)
     {
         this.cmd = element.cmd;
     }
     if (element.m_cx.HasValue == true)
     {
         this.cx = element.cx;
     }
     if (element.m_cy.HasValue == true)
     {
         this.cy = element.cy;
     }
     if (element.m_filename != null)
     {
         this.filename = element.filename;
     }
     if (element.m_id != null)
     {
         this.id = element.id;
     }
     if (element.m_idprefix != null)
     {
         this.idprefix = element.idprefix;
     }
     if (element.m_rotation.HasValue == true)
     {
         this.rotation = element.rotation;
     }
     if (element.m_state != null)
     {
         this.state = element.state;
     }
     if (element.m_swaprrd.HasValue == true)
     {
         this.swaprrd = element.swaprrd;
     }
     if (element.m_title != null)
     {
         this.title = element.title;
     }
     if (element.m_x.HasValue == true)
     {
         this.x = element.x;
     }
     if (element.m_y.HasValue == true)
     {
         this.y = element.y;
     }
     this.connectionlist = element.connectionlist;
 }
Exemplo n.º 2
0
        public static module Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            module _module = new module();

            _module.m_rocrailClient = rocrailClient;
            _module.m_cmd           = (string)xml.Attribute("cmd");
            _module.m_cx            = (int?)xml.Attribute("cx");
            _module.m_cy            = (int?)xml.Attribute("cy");
            _module.m_filename      = (string)xml.Attribute("filename");
            _module.m_id            = (string)xml.Attribute("id");
            _module.m_idprefix      = (string)xml.Attribute("idprefix");
            _module.m_rotation      = (int?)xml.Attribute("rotation");
            _module.m_state         = (string)xml.Attribute("state");
            _module.m_swaprrd       = (bool?)xml.Attribute("swaprrd");
            _module.m_title         = (string)xml.Attribute("title");
            _module.m_x             = (int?)xml.Attribute("x");
            _module.m_y             = (int?)xml.Attribute("y");
            Definitions.Tools.ParseList <connection>(_module.m_connectionlist, xml, "connection", connection.Parse, rocrailClient);
            return(_module);
        }