Ejemplo n.º 1
0
        public override void ReadXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (ele.TryPathTo("ItemText", false, out subEle))
            {
                if (ItemText == null)
                {
                    ItemText = new SimpleSubrecord <String>();
                }

                ItemText.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ResultText", false, out subEle))
            {
                if (ResultText == null)
                {
                    ResultText = new SimpleSubrecord <String>();
                }

                ResultText.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Flags", false, out subEle))
            {
                if (Flags == null)
                {
                    Flags = new SimpleSubrecord <TerminalMenuFlags>();
                }

                Flags.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("DisplayNote", false, out subEle))
            {
                if (DisplayNote == null)
                {
                    DisplayNote = new RecordReference();
                }

                DisplayNote.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("SubMenu", false, out subEle))
            {
                if (SubMenu == null)
                {
                    SubMenu = new RecordReference();
                }

                SubMenu.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Script", false, out subEle))
            {
                if (Script == null)
                {
                    Script = new EmbeddedScript();
                }

                Script.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Conditions", false, out subEle))
            {
                if (Conditions == null)
                {
                    Conditions = new List <Condition>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    Condition temp = new Condition();
                    temp.ReadXML(e, master);
                    Conditions.Add(temp);
                }
            }
        }