コード例 #1
0
        public void SetChapter(IChapter chapter)
        {
            if (chapter != GlobalEditorHandler.GetCurrentChapter())
            {
                GlobalEditorHandler.SetCurrentChapter(chapter);
            }

            CurrentChapter = chapter;

            Graphics.Reset();

            Grid = new WorkflowEditorGrid(Graphics, gridCellSize);

            Graphics.Canvas.ContextClick += HandleCanvasContextClick;

            EntryNode entryNode = CreateEntryNode(chapter);
            IDictionary <IStep, StepNode> stepNodes = SetupSteps(chapter);

            SetupTransitions(chapter, entryNode, stepNodes);

            Graphics.CalculateBoundingBox();

            if (EditorConfigurator.Instance.Validation.IsAllowedToValidate())
            {
                EditorConfigurator.Instance.Validation.Validate(CurrentChapter.Data, GlobalEditorHandler.GetCurrentCourse(), null);
            }
        }