// // ФУНКЦІЇ // /// <summary> /// Встановлює Активний набір умов та Активний стан /// </summary> /// <param name="state">Активний стан</param> private void SetCurrentStateCondition(string state) { //Якщо стан ще не загружений в память, тоді його потрібно загрузити if (!StateConditionsCollection.ContainsKey(state)) { StateConditions StateConditionItem = new StateConditions(); StateConditionItem.State = state; string statePath = (state == "" ? "" : state + "/"); XPathNodeIterator ifList = NamespaceNode.Select(statePath + "if"); while (ifList.MoveNext()) { StateConditionItem.ConditionsIf.Add(new StateIf(ifList.Current)); } XPathNodeIterator elseList = NamespaceNode.Select(statePath + "else"); while (elseList.MoveNext()) { StateConditionItem.ConditionsElse.Add(new StateElse(elseList.Current)); } StateConditionsCollection.Add(state, StateConditionItem); } //Активний набір умов CurrentStateCondition = StateConditionsCollection[state]; //Активний стан CurrentState = state; }