示例#1
0
        protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("Sky/Upper", true, out subEle);
            SkyUpper.WriteXML(subEle, master);

            ele.TryPathTo("Fog", true, out subEle);
            Fog.WriteXML(subEle, master);

            ele.TryPathTo("Unused1", true, out subEle);
            Unused1.WriteXML(subEle, master);

            ele.TryPathTo("Ambient", true, out subEle);
            Ambient.WriteXML(subEle, master);

            ele.TryPathTo("Sunlight", true, out subEle);
            Sunlight.WriteXML(subEle, master);

            ele.TryPathTo("Sun", true, out subEle);
            Sun.WriteXML(subEle, master);

            ele.TryPathTo("Stars", true, out subEle);
            Stars.WriteXML(subEle, master);

            ele.TryPathTo("Sky/Lower", true, out subEle);
            SkyLower.WriteXML(subEle, master);

            ele.TryPathTo("Horizon", true, out subEle);
            Horizon.WriteXML(subEle, master);

            ele.TryPathTo("Unused2", true, out subEle);
            Unused2.WriteXML(subEle, master);
        }
示例#2
0
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (Content != null)
            {
                ele.TryPathTo("Content", true, out subEle);
                Content.WriteXML(subEle, master);
            }
            if (Header != null)
            {
                ele.TryPathTo("Header", true, out subEle);
                Header.WriteXML(subEle, master);
            }
            if (Icon != null)
            {
                ele.TryPathTo("Icon", true, out subEle);
                Icon.WriteXML(subEle, master);
            }
            if (Unused0 != null)
            {
                ele.TryPathTo("Unused/Unused0", true, out subEle);
                Unused0.WriteXML(subEle, master);
            }
            if (Unused1 != null)
            {
                ele.TryPathTo("Unused/Unused1", true, out subEle);
                Unused1.WriteXML(subEle, master);
            }
            if (Unused2 != null)
            {
                ele.TryPathTo("Unused/Unused2", true, out subEle);
                Unused2.WriteXML(subEle, master);
            }
            if (Unused3 != null)
            {
                ele.TryPathTo("Unused/Unused3", true, out subEle);
                Unused3.WriteXML(subEle, master);
            }
            if (Unused4 != null)
            {
                ele.TryPathTo("Unused/Unused4", true, out subEle);
                Unused4.WriteXML(subEle, master);
            }
            if (Unused5 != null)
            {
                ele.TryPathTo("Unused/Unused5", true, out subEle);
                Unused5.WriteXML(subEle, master);
            }
            if (Unused6 != null)
            {
                ele.TryPathTo("Unused/Unused6", true, out subEle);
                Unused6.WriteXML(subEle, master);
            }
            if (Unused7 != null)
            {
                ele.TryPathTo("Unused/Unused7", true, out subEle);
                Unused7.WriteXML(subEle, master);
            }
            if (Unused8 != null)
            {
                ele.TryPathTo("Unused/Unused8", true, out subEle);
                Unused8.WriteXML(subEle, master);
            }
            if (Unused9 != null)
            {
                ele.TryPathTo("Unused/Unused9", true, out subEle);
                Unused9.WriteXML(subEle, master);
            }
            if (MessageFlags != null)
            {
                ele.TryPathTo("MessageFlags", true, out subEle);
                MessageFlags.WriteXML(subEle, master);
            }
            if (DisplayTime != null)
            {
                ele.TryPathTo("DisplayTime", true, out subEle);
                DisplayTime.WriteXML(subEle, master);
            }
            if (Buttons != null)
            {
                ele.TryPathTo("Buttons", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Button"
                };
                int i = 0;
                foreach (var entry in Buttons)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
        }