Ejemplo n.º 1
0
        private void SwitchToDiagramView()
        {
            FlowPathwayDiagram d = null;

            if (this.m_DiagramTab.Control == null)
            {
                d = new FlowPathwayDiagram();

                d.Load(this.DataFeed);
                d.IsReadOnly = (!this.m_IsEnabled);
                d.ConfigureShapeReadOnlySetting();

                d.ZoomChanged      += this.OnDiagramZoomChanged;
                d.MouseDoubleClick += this.OnDiagramMouseDoubleClick;

                this.m_DiagramTab.Control = d;
            }
            else
            {
                d = this.GetFlowDiagram();
            }

            this.ButtonZoomIn.Enabled        = true;
            this.ButtonZoomOut.Enabled       = true;
            this.ScrollBarVertical.Visible   = true;
            this.ScrollBarHorizontal.Enabled = true;
            this.ScrollBarVertical.Value     = d.VerticalScrollValue;
            this.ScrollBarHorizontal.Value   = d.HorizontalScrollValue;
            this.PanelControlHost.Width      = this.PanelBottomControls.Width - this.ScrollBarVertical.Width - 2;

            this.ResetScrollbars();
            this.SetCurrentControl();
        }
Ejemplo n.º 2
0
        public override void EnableView(bool enable)
        {
            this.m_IsEnabled = enable;
            FlowPathwayDiagram d = (FlowPathwayDiagram)this.m_DiagramTab.Control;

            if (d != null)
            {
                d.IsReadOnly = (!this.m_IsEnabled);
                d.ConfigureShapeReadOnlySetting();
            }
        }