/// <summary> /// Loads the plant node and links the I/O Table /// </summary> private ProcessingData InitialisePlant(ILessonEntity openedLesson) { _lessonView = GetNode <LessonView>("HscRelative/LessonView"); _lessonView.LoadAndShowInfo(openedLesson); _loadedSimulationNode = _lessonView.PlantView.LoadedSimulationNode; ProcessingData data = new ProcessingData { InputRegisters = new StateTable(_loadedSimulationNode.SimulationOutput), OutputRegisters = new StateTable(_loadedSimulationNode.SimulationInput) }; return(data); }
/// <summary> /// Initializes the whole page. Called before the node is added to the tree by the lesson controller. /// </summary> public override void InitialiseWith(IMainNode mainNode, ILessonEntity openedLesson) { MainNode = mainNode; OpenedLesson = openedLesson; LessonView = GetNode <LessonView>(LessonViewPath); LessonView.LoadAndShowInfo(openedLesson); Sfc2dEditorNode = GetNode <Sfc2dEditorNode>(Sfc2dEditorPath); HelpPage = GetNode <HelpPage>(EditorHelpPath); ProcessingData data = new ProcessingData { InputRegisters = new StateTable(LessonView.PlantView.LoadedSimulationNode.SimulationOutput), OutputRegisters = new StateTable(LessonView.PlantView.LoadedSimulationNode.SimulationInput) }; Sfc2dEditorNode.InitializeEditor(data, true); TryLoadDiagram(); }
/// <summary> /// Informs the grid, that the selection has changed to this button and the UI needs to be updated. /// </summary> public void SelectionChangedTo(ILessonEntity selectedLesson) { _lessonView.LoadAndShowInfo(selectedLesson); }