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

            _plan.m_rocrailClient  = rocrailClient;
            _plan.m_donkey         = (bool?)xml.Attribute("donkey");
            _plan.m_healthy        = (bool?)xml.Attribute("healthy");
            _plan.m_modplan        = (bool?)xml.Attribute("modplan");
            _plan.m_modtitle       = (string)xml.Attribute("modtitle");
            _plan.m_name           = (string)xml.Attribute("name");
            _plan.m_rocguiversion  = (string)xml.Attribute("rocguiversion");
            _plan.m_rocrailpwd     = (string)xml.Attribute("rocrailpwd");
            _plan.m_rocrailversion = (string)xml.Attribute("rocrailversion");
            _plan.m_themes         = (string)xml.Attribute("themes");
            _plan.m_title          = (string)xml.Attribute("title");

            Definitions.Tools.ParseList <ac>(_plan.m_aclist, xml, "ac", ac.Parse, rocrailClient);
            Definitions.Tools.ParseList <bk>(_plan.m_bklist, xml, "bk", bk.Parse, rocrailClient);
            Definitions.Tools.ParseList <booster>(_plan.m_boosterlist, xml, "booster", booster.Parse, rocrailClient);
            Definitions.Tools.ParseList <car>(_plan.m_carlist, xml, "car", car.Parse, rocrailClient);
            Definitions.Tools.ParseList <co>(_plan.m_colist, xml, "co", co.Parse, rocrailClient);
            Definitions.Tools.ParseList <dec>(_plan.m_declist, xml, "dec", dec.Parse, rocrailClient);
            Definitions.Tools.ParseList <digint>(_plan.m_digintlist, xml, "digint", digint.Parse, rocrailClient);
            Definitions.Tools.ParseList <fb>(_plan.m_fblist, xml, "fb", fb.Parse, rocrailClient);
            Definitions.Tools.ParseList <lc>(_plan.m_lclist, xml, "lc", lc.Parse, rocrailClient);
            Definitions.Tools.ParseList <link>(_plan.m_linklist, xml, "link", link.Parse, rocrailClient);
            Definitions.Tools.ParseList <location>(_plan.m_locationlist, xml, "location", location.Parse, rocrailClient);
            Definitions.Tools.ParseList <mv>(_plan.m_mvlist, xml, "mv", mv.Parse, rocrailClient);
            Definitions.Tools.ParseList <@operator>(_plan.m_operatorlist, xml, "operator", @operator.Parse, rocrailClient);
            Definitions.Tools.ParseList <sb>(_plan.m_sblist, xml, "sb", sb.Parse, rocrailClient);
            Definitions.Tools.ParseList <sc>(_plan.m_sclist, xml, "sc", sc.Parse, rocrailClient);
            Definitions.Tools.ParseList <seltab>(_plan.m_seltablist, xml, "seltab", seltab.Parse, rocrailClient);
            Definitions.Tools.ParseList <sg>(_plan.m_sglist, xml, "sg", sg.Parse, rocrailClient);
            Definitions.Tools.ParseList <st>(_plan.m_stlist, xml, "st", st.Parse, rocrailClient);
            Definitions.Tools.ParseList <sw>(_plan.m_swlist, xml, "sw", sw.Parse, rocrailClient);
            Definitions.Tools.ParseList <system>(_plan.m_systemlist, xml, "system", system.Parse, rocrailClient);
            Definitions.Tools.ParseList <tk>(_plan.m_tklist, xml, "tk", tk.Parse, rocrailClient);
            Definitions.Tools.ParseList <tour>(_plan.m_tourlist, xml, "tour", tour.Parse, rocrailClient);
            Definitions.Tools.ParseList <traverser>(_plan.m_traverserlist, xml, "traverser", traverser.Parse, rocrailClient);
            Definitions.Tools.ParseList <tt>(_plan.m_ttlist, xml, "tt", tt.Parse, rocrailClient);
            Definitions.Tools.ParseList <tx>(_plan.m_txlist, xml, "tx", tx.Parse, rocrailClient);
            Definitions.Tools.ParseList <waybill>(_plan.m_waybilllist, xml, "waybill", waybill.Parse, rocrailClient);
            Definitions.Tools.ParseList <zlevel>(_plan.m_zlevellist, xml, "zlevel", zlevel.Parse, rocrailClient);
            return(_plan);
        }
Exemple #2
0
 public void Update(plan element)
 {
     if (element.m_donkey.HasValue == true)
     {
         this.donkey = element.donkey;
     }
     if (element.m_healthy.HasValue == true)
     {
         this.healthy = element.healthy;
     }
     if (element.m_modplan.HasValue == true)
     {
         this.modplan = element.modplan;
     }
     if (element.m_modtitle != null)
     {
         this.modtitle = element.modtitle;
     }
     if (element.m_name != null)
     {
         this.name = element.name;
     }
     if (element.m_rocguiversion != null)
     {
         this.rocguiversion = element.rocguiversion;
     }
     if (element.m_rocrailpwd != null)
     {
         this.rocrailpwd = element.rocrailpwd;
     }
     if (element.m_rocrailversion != null)
     {
         this.rocrailversion = element.rocrailversion;
     }
     if (element.m_themes != null)
     {
         this.themes = element.themes;
     }
     if (element.m_title != null)
     {
         this.title = element.title;
     }
     this.aclist        = element.aclist;
     this.bklist        = element.bklist;
     this.boosterlist   = element.boosterlist;
     this.carlist       = element.carlist;
     this.colist        = element.colist;
     this.declist       = element.declist;
     this.digintlist    = element.digintlist;
     this.fblist        = element.fblist;
     this.lclist        = element.lclist;
     this.linklist      = element.linklist;
     this.locationlist  = element.locationlist;
     this.mvlist        = element.mvlist;
     this.operatorlist  = element.operatorlist;
     this.sblist        = element.sblist;
     this.sclist        = element.sclist;
     this.seltablist    = element.seltablist;
     this.sglist        = element.sglist;
     this.stlist        = element.stlist;
     this.swlist        = element.swlist;
     this.systemlist    = element.systemlist;
     this.tklist        = element.tklist;
     this.tourlist      = element.tourlist;
     this.traverserlist = element.traverserlist;
     this.ttlist        = element.ttlist;
     this.txlist        = element.txlist;
     this.waybilllist   = element.waybilllist;
     this.zlevellist    = element.zlevellist;
 }