Exemple #1
0
 /// <summary>
 /// Initializes the whole twat viewer. Called before the node is added to the tree by the lesson controller.
 /// </summary>
 public override void InitialiseWith(IMainNode mainNode, ILessonEntity openedLesson)
 {
     _openedLesson    = openedLesson;
     Simulation       = GetNode <CircularSawModel>("ViewportContainer/Viewport/CircularSawModel");
     SimulationMaster = DiagramSimulationLoader.LoadTemp(openedLesson, Simulation);
     if (SimulationMaster != null)
     {
         Simulation.InitialiseWith(mainNode, openedLesson);
         _isExecutable = SimulationMaster.IsProgramSimulationValid();
         SetupTestSteps();
     }
     else
     {
         _isExecutable = false;
     }
 }
Exemple #2
0
 /// <summary>
 /// Initializes the whole test viewer. Called before the node is added to the tree by the lesson controller.
 /// </summary>
 public override void InitialiseWith(IMainNode mainNode, ILessonEntity openedLesson)
 {
     _openedLesson    = openedLesson;
     Simulation       = GetNode <MassTestChamber>(_testChamberPath);
     SimulationMaster = DiagramSimulationLoader.LoadTemp(openedLesson, Simulation);
     if (SimulationMaster != null)
     {
         Simulation.InitialiseWith(mainNode, openedLesson);
         IsExecutable = SimulationMaster.IsProgramSimulationValid();
     }
     else
     {
         IsExecutable = false;
     }
     PaperLog = GetNode <PaperLog>("PaperLog");
     PaperLog.Setup();
     TestController = new TestController(this);
     TestController.Setup();
 }