Exemple #1
0
        public override void parse(XmlCtl node)
        {
            string exe   = ctl.pSet.cvt(node.attr("attr"));
            string param = ctl.pSet.cvt(node.value());

            runExe(exe, param);
        }
Exemple #2
0
        public string attr(string strNode, string initData = "")
        {
            string result = "";

            try {
                var idx = strNode.LastIndexOf('.');
                if (idx < 0)
                {
                    if (doc != null && doc.NodeType == XmlNodeType.Element)
                    {
                        XmlElement eleNode = (XmlElement)doc;
                        if (!eleNode.HasAttribute(strNode))
                        {
                            return(initData);
                        }
                        else
                        {
                            result = eleNode.GetAttribute(strNode);
                        }
                        return(result);
                    }
                }
                else
                {
                    XmlCtl ele = child(strNode.Substring(0, idx));
                    result = ele.attr(strNode.Substring(idx + 1), initData);
                }
            } catch (Exception) {
                setAttr(strNode, initData);
                return(initData);
            }

            if (result == "")
            {
                return(initData);
            }
            return(result);
        }
Exemple #3
0
 public override void parse(XmlCtl node)
 {
     mapVar[node.attr("name")] = cvt(node.value());
 }