コード例 #1
0
        public void FromXml(System.Xml.XmlNode node)
        {
            int value;

            if (Int32.TryParse(node.GetAttribute("button"), out value))
            {
                Button = value + 1;
            }

            IfFalseSayText = node.GetAttribute("offText");
            IfFalseMappings.FromXml(node.SelectSingleNode("Off"));
            IfTrueSayText = node.GetAttribute("onText");
            IfTrueMappings.FromXml(node.SelectSingleNode("On"));
        }
コード例 #2
0
        public void FromXml(System.Xml.XmlNode node)
        {
            Joystick = node.GetAttribute("joystick");
            int value;

            if (Int32.TryParse(node.GetAttribute("button"), out value))
            {
                Button = value + 1;
            }

            IfFalseSayText = node.GetAttribute("deactivatedText");
            IfFalseMappings.FromXml(node.SelectSingleNode("Deactivated"));
            IfTrueSayText = node.GetAttribute("activatedText");
            IfTrueMappings.FromXml(node.SelectSingleNode("Activated"));
        }