Exemple #1
0
        public static track Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            track _track = new track();

            _track.m_rocrailClient = rocrailClient;
            _track.m_bkid          = (string)xml.Attribute("bkid");
            _track.m_decnr         = (int?)xml.Attribute("decnr");
            _track.m_desc          = (string)xml.Attribute("desc");
            _track.m_nr            = (int?)xml.Attribute("nr");
            _track.m_oppositetrack = (int?)xml.Attribute("oppositetrack");
            _track.m_polarization  = (bool?)xml.Attribute("polarization");
            _track.m_posfb         = (string)xml.Attribute("posfb");
            _track.m_show          = (bool?)xml.Attribute("show");
            _track.m_state         = (bool?)xml.Attribute("state");
            return(_track);
        }
Exemple #2
0
 public void Update(track element)
 {
     if (element.m_bkid != null)
     {
         this.bkid = element.bkid;
     }
     if (element.m_decnr.HasValue == true)
     {
         this.decnr = element.decnr;
     }
     if (element.m_desc != null)
     {
         this.desc = element.desc;
     }
     if (element.m_nr.HasValue == true)
     {
         this.nr = element.nr;
     }
     if (element.m_oppositetrack.HasValue == true)
     {
         this.oppositetrack = element.oppositetrack;
     }
     if (element.m_polarization.HasValue == true)
     {
         this.polarization = element.polarization;
     }
     if (element.m_posfb != null)
     {
         this.posfb = element.posfb;
     }
     if (element.m_show.HasValue == true)
     {
         this.show = element.show;
     }
     if (element.m_state.HasValue == true)
     {
         this.state = element.state;
     }
 }