コード例 #1
0
        TabPageController InitializeTab(TabPage tabPage, bool readOnly, Control container)
        {
            var workflowGraphView = new WorkflowGraphView(serviceProvider, this, readOnly);

            workflowGraphView.BackColorChanged += (sender, e) =>
            {
                tabPage.BackColor = workflowGraphView.BackColor;
                if (tabControl.SelectedTab == tabPage)
                {
                    InitializeTheme(tabPage);
                }
            };
            workflowGraphView.Dock = DockStyle.Fill;
            workflowGraphView.Font = Font;
            workflowGraphView.Tag  = tabPage;

            var tabState = new TabPageController(tabPage, workflowGraphView, this);

            tabPage.Tag = tabState;
            tabPage.SuspendLayout();
            if (container != null)
            {
                container.TextChanged += (sender, e) => tabState.Text = container.Text;
                container.Controls.Add(workflowGraphView);
                tabPage.Controls.Add(container);
            }
            else
            {
                tabPage.Controls.Add(workflowGraphView);
            }
            tabPage.BackColor = workflowGraphView.BackColor;
            tabPage.ResumeLayout(false);
            tabPage.PerformLayout();
            return(tabState);
        }
コード例 #2
0
        public void UpdateSelection(WorkflowGraphView selectedView)
        {
            if (selectedView == null)
            {
                throw new ArgumentNullException("selectedView");
            }

            SelectedView  = selectedView;
            SelectedNodes = selectedView.GraphView.SelectedNodes;
            OnSelectionChanged(EventArgs.Empty);
        }
コード例 #3
0
        public void SelectTab(WorkflowGraphView workflowGraphView)
        {
            var tabPage = (TabPage)workflowGraphView.Tag;

            if (tabPage != null)
            {
                var tabIndex = tabControl.TabPages.IndexOf(tabPage);
                if (tabIndex >= 0)
                {
                    tabControl.SelectTab(tabIndex);
                }
            }
        }
コード例 #4
0
            public TabPageController(TabPage tabPage, WorkflowGraphView graphView, WorkflowEditorControl editorControl)
            {
                if (tabPage == null)
                {
                    throw new ArgumentNullException("tabPage");
                }

                if (graphView == null)
                {
                    throw new ArgumentNullException("graphView");
                }

                if (editorControl == null)
                {
                    throw new ArgumentNullException("editorControl");
                }

                TabPage           = tabPage;
                WorkflowGraphView = graphView;
                owner             = editorControl;
            }
コード例 #5
0
 public void UpdateVisualizerLayout()
 {
     WorkflowGraphView.UpdateVisualizerLayout();
 }
コード例 #6
0
 public void UpdateSelection()
 {
     WorkflowGraphView.UpdateSelection();
 }
コード例 #7
0
 public void UpdateSelection(WorkflowGraphView selectedView)
 {
     SelectedView  = selectedView ?? throw new ArgumentNullException(nameof(selectedView));
     SelectedNodes = selectedView.GraphView.SelectedNodes;
     OnSelectionChanged(EventArgs.Empty);
 }
コード例 #8
0
 public TabPageController(TabPage tabPage, WorkflowGraphView graphView)
 {
     TabPage           = tabPage ?? throw new ArgumentNullException(nameof(tabPage));
     WorkflowGraphView = graphView ?? throw new ArgumentNullException(nameof(graphView));
 }