Beispiel #1
0
        public static ConditionalDefinition LoadConditional(XmlNode node)
        {
            ConditionalDefinition ret = new ConditionalDefinition();

            foreach (XmlNode subNode in node.ChildNodes)
            {
                if (TemplateDefinition.SkipNode(subNode))
                {
                    continue;
                }
                if (ret.ifNode != null && subNode.Name == "if")
                {
                    break;
                }
                if (subNode.Name == "if")
                {
                    ret.ifNode = subNode;
                }
                if (subNode.Name == "elseif")
                {
                    ret.elseifNodeList.Add(subNode);
                }
                if (subNode.Name == "else")
                {
                    ret.elseNode = subNode;
                }
                if (subNode.Name == "switch")
                {
                    ret.switchNode = subNode;
                }
            }
            return (ret);
        }
Beispiel #2
0
        public static ConditionalDefinition LoadConditional(XmlNode node)
        {
            ConditionalDefinition ret = new ConditionalDefinition();

            foreach (XmlNode subNode in node.ChildNodes)
            {
                if (TemplateDefinition.SkipNode(subNode))
                {
                    continue;
                }
                if (ret.ifNode != null && subNode.Name == "if")
                {
                    break;
                }
                if (subNode.Name == "if")
                {
                    ret.ifNode = subNode;
                }
                if (subNode.Name == "elseif")
                {
                    ret.elseifNodeList.Add(subNode);
                }
                if (subNode.Name == "else")
                {
                    ret.elseNode = subNode;
                }
                if (subNode.Name == "switch")
                {
                    ret.switchNode = subNode;
                }
            }
            return(ret);
        }
Beispiel #3
0
        private void LoadOverlayBlocks(XmlNode node)
        {
            foreach (XmlNode overlayBlockNode in node.ChildNodes)
            {
                if (SkipNode(overlayBlockNode))
                {
                    continue;
                }
                LinkDefinition.LinkWrapper wrapper = new LinkDefinition.LinkWrapper();
                if (overlayBlockNode.Name == "link")
                {
                    LinkDefinition link = LinkDefinition.LoadLink(overlayBlockNode);
                    wrapper.Link = link;
                }
                if (overlayBlockNode.Name == "conditional")
                {
                    ConditionalDefinition conditional = ConditionalDefinition.LoadConditional(overlayBlockNode);
                    wrapper.Conditional = conditional;
                }
                if (overlayBlockNode.Name == "artoverlay")
                {
                    BlockDefinition b = SpecialBlockDefinition.LoadSectionDefinition(null, overlayBlockNode);
                    wrapper.CardArtCrop = b;
                }

                OverlayBlocks.Add(wrapper);
            }
        }
Beispiel #4
0
        private void LoadTextBlocks(XmlNode node)
        {
            foreach (XmlNode textBlocksNode in node.ChildNodes)
            {
                if (SkipNode(textBlocksNode))
                {
                    continue;
                }
                LinkDefinition.LinkWrapper wrapper = new LinkDefinition.LinkWrapper();
                if (textBlocksNode.Name == "link")
                {
                    LinkDefinition link = LinkDefinition.LoadLink(textBlocksNode);
                    wrapper.Link = link;
                }
                if (textBlocksNode.Name == "conditional")
                {
                    ConditionalDefinition conditional = ConditionalDefinition.LoadConditional(textBlocksNode);
                    wrapper.Conditional = conditional;
                }

                TextBlocks.Add(wrapper);
            }
        }