/// <summary> /// OnClick, OnDoubleClick등의 Tag에 대해 분석한다. /// </summary> /// <param name="rootNode"></param> public void LoadXml(XmlDocument xDoc, XmlNode rootNode, bool refLoad = false) { if (rootNode == null) { return; } Actions.Clear(); XmlControlHandler.GetDefaultXmlItemAttributes(rootNode, xDoc, this); XmlCondition cCond = null; _eventType = rootNode.Name; // (EventTypes)GlobalVars.EventTypes.ToList().IndexOf(rootNode.Name); List <XmlActionList> cActionGroup = new List <XmlActionList>(); // XmlActionList(); for (int i = 0; i < rootNode.ChildNodes.Count; i++) { XmlNode xChild = rootNode.ChildNodes[i]; XmlActionList cActions = new XmlActionList(); if (xChild.Name.Equals("Actions")) { cActions.LoadXml(xDoc, xChild); Actions.Add(cActions); } } if (cCond == null) { cCond = XmlCondition.New(XmlConditionTypes.True); } }
public void LoadXml(XmlDocument xDoc, XmlNode rootNode, Boolean refLoad = false) { if (rootNode == null) { return; } _xDoc = xDoc; XmlControlHandler.GetDefaultXmlItemAttributes(rootNode, xDoc, this); NowLoading = this; _matchItem = XmlMatchItem.NowLoading; foreach (XmlNode child in rootNode.ChildNodes) { if (child.Name.Equals("Condition")) { XmlNode condNode = XmlHandlers.XmlGetter.FirstChild(child); XmlCondition cond = XmlCondition.New(condNode.Name); cond.LoadXml(xDoc, condNode, refLoad); _condition = cond; } else if (child.Name.Equals("Component")) { XmlMatchComponent comp = new XmlMatchComponent(); comp.LoadXml(xDoc, child); _components.Add(comp); } } if (_condition == null) { _condition = XmlCondition.New(XmlConditionTypes.True); //default condition } }
public void LoadXml(XmlDocument xDoc, XmlNode rootNode, Boolean refLoad = false) { if (rootNode == null) { return; } XmlControlHandler.GetDefaultXmlItemAttributes(rootNode, xDoc, this); this.Clear(); if (rootNode == null) { throw new Exception("올바른 Actions Tag가 아닙니다. 루트가 Actions 가 아닙니다. "); } for (int i = 0; i < rootNode.ChildNodes.Count; i++) { XmlNode xChild = rootNode.ChildNodes[i]; if (xChild.Name.Equals("Condition")) { XmlNode condNode = xChild.FirstChild; Condition = XmlCondition.New(condNode.Name); Condition.LoadXml(xDoc, xChild); } else if (xChild.Name.Equals("ComponentCondition")) { ComCondition = XmlComConditions.New();//현재 loading중인 conmponent의 고유 ComponentCondition을 가져온다. ComCondition.LoadXml(xDoc, xChild); } else { XmlNode xAction = xChild; XmlAction action = new XmlAction(); action.LoadXml(xDoc, xAction); this.Add(action); } } }
public XmlActionList() : base() { Condition = XmlCondition.New(XmlConditionTypes.True);//default는 true.. }
public List <XmlActionList> Actions = new List <XmlActionList>();// new XmlActionList(); public XmlEvent() { XmlCondition.New(XmlConditionTypes.And); }