예제 #1
0
 private void showStateGraphToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.selectedNode != null)
     {
         IState state = this.exploredTransitions.stateMap[this.selectedNode];
         StateContainer <IState> sc = new StateContainer <IState>(this.modelProgram, state);
         // FSM fsm = FSM.Create("T(o1(),label2(),o2())", "T(o2(),label2(),o3())").Accept("o2()");
         FSM             fsm = FSM.Create(sc.ExtractFSM(state));
         FsmModelProgram mp  = new FsmModelProgram(fsm, this.selectedNode.ToString());
         Visualization.ModelProgramGraphViewForm form = new ModelProgramGraphViewForm("State graph viewer", false);
         form.View.StateShape = StateShape.Box;
         //form.View.SetModelProgram(mp);
         form.View.SetStateMachine(fsm, null);
         form.View.transitionLabels = TransitionLabel.ActionSymbol;
         form.Show();
     }
 }
예제 #2
0
 private void showStateGraphToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.selectedNode != null)
     {
         IState state = this.exploredTransitions.stateMap[this.selectedNode];
         StateContainer<IState> sc = new StateContainer<IState>(this.modelProgram, state);
         // FSM fsm = FSM.Create("T(o1(),label2(),o2())", "T(o2(),label2(),o3())").Accept("o2()");
         FSM fsm = FSM.Create(sc.ExtractFSM(state));
         FsmModelProgram mp = new FsmModelProgram(fsm, this.selectedNode.ToString());
         Visualization.ModelProgramGraphViewForm form = new ModelProgramGraphViewForm("State graph viewer", false);
         form.View.StateShape = StateShape.Box;
         //form.View.SetModelProgram(mp);
         form.View.SetStateMachine(fsm,null);
         form.View.transitionLabels = TransitionLabel.ActionSymbol;
         form.Show();
     }
 }