Exemplo n.º 1
0
    public override bool XmlDeserilize(XmlData data)
    {
        Position = ToolParser.VectorParser(data.GetAttribute(ERuleEditorKey.Position));

        if (!RuleHost.XmlDeserilize(data))
        {
            return(false);
        }

        return(true);
    }
Exemplo n.º 2
0
        public CRule(XmlData data)
        {
            RuleID = ToolParser.IntParse(data.GetAttribute(ERuleKey.ID));
            XmlData main = data.SearchChild((XmlData _data) => { return(ERuleKey.Main.Equals(_data.Node)); });

            if (null == main)
            {
                return;
            }

            EnteranceExcuters = new Dictionary <int, RuleExcuter>();
            foreach (var exeData in main.Childs)
            {
                Type        type   = Type.GetType("CJC.Framework.Rule." + exeData.Node);
                RuleExcuter branch = Activator.CreateInstance(type) as RuleExcuter;
                branch.OnInit(this, exeData);

                EnteranceExcuters.Add(branch.BranchID, branch);
            }
        }
Exemplo n.º 3
0
 public virtual void OnInit(CRule rule, XmlData data)
 {
     mRule    = rule;
     BranchID = ToolParser.IntParse(data.GetAttribute(ERuleKey.ID));
 }