public void Update(zlevel element) { if (element.m_active.HasValue == true) { this.active = element.active; } if (element.m_modid != null) { this.modid = element.modid; } if (element.m_modviewcx.HasValue == true) { this.modviewcx = element.modviewcx; } if (element.m_modviewcy.HasValue == true) { this.modviewcy = element.modviewcy; } if (element.m_modviewx.HasValue == true) { this.modviewx = element.modviewx; } if (element.m_modviewy.HasValue == true) { this.modviewy = element.modviewy; } if (element.m_title != null) { this.title = element.title; } if (element.m_z.HasValue == true) { this.z = element.z; } }
public static zlevel Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient) { zlevel _zlevel = new zlevel(); _zlevel.m_rocrailClient = rocrailClient; _zlevel.m_active = (bool?)xml.Attribute("active"); _zlevel.m_modid = (string)xml.Attribute("modid"); _zlevel.m_modviewcx = (int?)xml.Attribute("modviewcx"); _zlevel.m_modviewcy = (int?)xml.Attribute("modviewcy"); _zlevel.m_modviewx = (int?)xml.Attribute("modviewx"); _zlevel.m_modviewy = (int?)xml.Attribute("modviewy"); _zlevel.m_title = (string)xml.Attribute("title"); _zlevel.m_z = (int?)xml.Attribute("z"); return(_zlevel); }