public static modplan Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient) { modplan _modplan = new modplan(); _modplan.m_rocrailClient = rocrailClient; _modplan.m_initfield = (bool?)xml.Attribute("initfield"); _modplan.m_locs = (string)xml.Attribute("locs"); _modplan.m_modified = (bool?)xml.Attribute("modified"); _modplan.m_modroutes = (bool?)xml.Attribute("modroutes"); _modplan.m_routes = (string)xml.Attribute("routes"); _modplan.m_savemodplan = (bool?)xml.Attribute("savemodplan"); _modplan.m_savemodules = (bool?)xml.Attribute("savemodules"); _modplan.m_subtitle = (string)xml.Attribute("subtitle"); _modplan.m_title = (string)xml.Attribute("title"); Definitions.Tools.ParseList <module>(_modplan.m_modulelist, xml, "module", module.Parse, rocrailClient); return(_modplan); }
public void Update(modplan element) { if (element.m_initfield.HasValue == true) { this.initfield = element.initfield; } if (element.m_locs != null) { this.locs = element.locs; } if (element.m_modified.HasValue == true) { this.modified = element.modified; } if (element.m_modroutes.HasValue == true) { this.modroutes = element.modroutes; } if (element.m_routes != null) { this.routes = element.routes; } if (element.m_savemodplan.HasValue == true) { this.savemodplan = element.savemodplan; } if (element.m_savemodules.HasValue == true) { this.savemodules = element.savemodules; } if (element.m_subtitle != null) { this.subtitle = element.subtitle; } if (element.m_title != null) { this.title = element.title; } this.modulelist = element.modulelist; }