public static mv Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient) { mv _mv = new mv(); _mv.m_rocrailClient = rocrailClient; _mv.m_distance = (int?)xml.Attribute("distance"); _mv.m_mph = (bool?)xml.Attribute("mph"); _mv.m_s1 = (string)xml.Attribute("s1"); _mv.m_s2 = (string)xml.Attribute("s2"); _mv.m_scale = (int?)xml.Attribute("scale"); return(_mv); }
public void Update(mv element) { if (element.m_distance.HasValue == true) { this.distance = element.distance; } if (element.m_mph.HasValue == true) { this.mph = element.mph; } if (element.m_s1 != null) { this.s1 = element.s1; } if (element.m_s2 != null) { this.s2 = element.s2; } if (element.m_scale.HasValue == true) { this.scale = element.scale; } }