Ejemplo n.º 1
0
 internal void Initialize()
 {
     if (this.stateName == null)
     {
         StringBuilder sb = new StringBuilder();
         PreorderLeaves(this.rootState, sb);
         this.composedModelName = sb.ToString();
         CreateVariableWiewers();
     }
     else
     {
         //state names are known
         PreorderLeaves(this.rootState, stateName);
         this.composedModelName = stateName.ToString();
         CreateVariableWiewers();
     }
 }
Ejemplo n.º 2
0
 void PreorderLeaves(IState stateNode, FAName sn)
 {
     if (sn != null)
     {
         IPairState pstate = stateNode as IPairState;
         if (pstate != null)
         {
             PreorderLeaves(pstate.First, sn.left);
             PreorderLeaves(pstate.Second, sn.right);
         }
         else
         {
             string modelName = sn.ToString();
             leafStates.Add(stateNode);
             modelNames.Add(modelName);
         }
     }
 }