Exemple #1
0
 /// <summary>
 /// Creates a controller and initializes the patch fields.
 /// </summary>
 public void InitializeEditor(ProcessingData data, bool isEditable)
 {
     _renderViewportReferenceRect = GetNode <ReferenceRect>("RenderViewportReferenceRect");
     Sfc2dEditorControl           = new Sfc2dEditorControl(_renderViewportReferenceRect, data, isEditable);
     Connect("resized", this, nameof(MarkForResizeOffsetRestore));
     _currentScale = new Vector2(1f, 1f);
 }
        /// <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();
        }
Exemple #3
0
 public Sfc2dEditorControl(ReferenceRect referenceRect, ProcessingData data, bool isEditable)
 {
     ReferenceRect = referenceRect;
     Data          = data;
     _isEditable   = isEditable;
 }