示例#1
0
        public static cvbyte Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            cvbyte _cvbyte = new cvbyte();

            _cvbyte.m_rocrailClient = rocrailClient;
            _cvbyte.m_cat           = (string)xml.Attribute("cat");
            _cvbyte.m_desc          = (string)xml.Attribute("desc");
            _cvbyte.m_dipid         = (string)xml.Attribute("dipid");
            _cvbyte.m_info          = (string)xml.Attribute("info");
            _cvbyte.m_nr            = (int?)xml.Attribute("nr");
            _cvbyte.m_readonly      = (bool?)xml.Attribute("readonly");
            _cvbyte.m_url           = (string)xml.Attribute("url");
            _cvbyte.m_value         = (int?)xml.Attribute("value");
            _cvbyte.m_word          = (bool?)xml.Attribute("word");
            Definitions.Tools.ParseList <adip>(_cvbyte.m_adiplist, xml, "adip", adip.Parse, rocrailClient);
            return(_cvbyte);
        }
示例#2
0
 public void Update(cvbyte element)
 {
     if (element.m_cat != null)
     {
         this.cat = element.cat;
     }
     if (element.m_desc != null)
     {
         this.desc = element.desc;
     }
     if (element.m_dipid != null)
     {
         this.dipid = element.dipid;
     }
     if (element.m_info != null)
     {
         this.info = element.info;
     }
     if (element.m_nr.HasValue == true)
     {
         this.nr = element.nr;
     }
     if (element.m_readonly.HasValue == true)
     {
         this.@readonly = element.@readonly;
     }
     if (element.m_url != null)
     {
         this.url = element.url;
     }
     if (element.m_value.HasValue == true)
     {
         this.@value = element.@value;
     }
     if (element.m_word.HasValue == true)
     {
         this.word = element.word;
     }
     this.adiplist = element.adiplist;
 }