示例#1
0
 public void Update(dec element)
 {
     if (element.m_addr.HasValue == true)
     {
         this.addr = element.addr;
     }
     if (element.m_bus.HasValue == true)
     {
         this.bus = element.bus;
     }
     if (element.m_catnr != null)
     {
         this.catnr = element.catnr;
     }
     if (element.m_decfile != null)
     {
         this.decfile = element.decfile;
     }
     if (element.m_desc != null)
     {
         this.desc = element.desc;
     }
     if (element.m_docu != null)
     {
         this.docu = element.docu;
     }
     if (element.m_id != null)
     {
         this.id = element.id;
     }
     if (element.m_iid != null)
     {
         this.iid = element.iid;
     }
     if (element.m_image != null)
     {
         this.image = element.image;
     }
     if (element.m_manu != null)
     {
         this.manu = element.manu;
     }
     if (element.m_prev_id != null)
     {
         this.prev_id = element.prev_id;
     }
     if (element.m_prot != null)
     {
         this.prot = element.prot;
     }
     if (element.m_protver.HasValue == true)
     {
         this.protver = element.protver;
     }
     this.cvbytelist = element.cvbytelist;
 }
示例#2
0
        public static dec Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            dec _dec = new dec();

            _dec.m_rocrailClient = rocrailClient;
            _dec.m_addr          = (int?)xml.Attribute("addr");
            _dec.m_bus           = (int?)xml.Attribute("bus");
            _dec.m_catnr         = (string)xml.Attribute("catnr");
            _dec.m_decfile       = (string)xml.Attribute("decfile");
            _dec.m_desc          = (string)xml.Attribute("desc");
            _dec.m_docu          = (string)xml.Attribute("docu");
            _dec.m_id            = (string)xml.Attribute("id");
            _dec.m_iid           = (string)xml.Attribute("iid");
            _dec.m_image         = (string)xml.Attribute("image");
            _dec.m_manu          = (string)xml.Attribute("manu");
            _dec.m_prev_id       = (string)xml.Attribute("prev_id");
            _dec.m_prot          = (string)xml.Attribute("prot");
            _dec.m_protver       = (int?)xml.Attribute("protver");
            Definitions.Tools.ParseList <cvbyte>(_dec.m_cvbytelist, xml, "cvbyte", cvbyte.Parse, rocrailClient);
            return(_dec);
        }