Ejemplo n.º 1
0
 internal void FirePaneResize(PaneResizeEventArgs e)
 {
     if (PaneResize != null)
     {
         PaneResize(this, e);
     }
 }
Ejemplo n.º 2
0
 internal override void FinishDrag(MouseEventArgs e)
 {
     _paneResizeEventArgs = null;
     Chart.Panes.RecalculatePercentHeight();
     Chart.Invalidate();
     if (PaneFrameTool.PaneResizeStyle == PaneResizeStyle.Outline)
     {
         _pen.Dispose();
         _screenGraphics.Dispose();
         _backBuffer.Dispose();
         _frontBuffer.Dispose();
     }
 }
Ejemplo n.º 3
0
 internal override void FinishDrag(MouseEventArgs e)
 {
     _paneResizeEventArgs = null;
     Chart.Panes.RecalculatePercentHeight();
     Chart.Invalidate();
     if (PaneFrameTool.PaneResizeStyle == PaneResizeStyle.Outline)
     {
         _pen.Dispose();
         _screenGraphics.Dispose();
         _backBuffer.Dispose();
         _frontBuffer.Dispose();
     }
 }
Ejemplo n.º 4
0
        internal override void StartDrag(MouseEventArgs e)
        {
            Pane currentPane;
            Pane pane2;
            bool flag = HitTestPaneBottomBorder(e.Y);

            HitTestPaneTopBorder(e.Y);
            int index = Chart.Panes.PositionList.IndexOf(CurrentPane);

            if (flag)
            {
                currentPane = CurrentPane;
                pane2       = (Pane)Chart.Panes.PositionList[index + 1];
            }
            else
            {
                currentPane = (Pane)Chart.Panes.PositionList[index - 1];
                pane2       = CurrentPane;
            }
            _paneResizeEventArgs = new PaneResizeEventArgs(currentPane, pane2)
            {
                Start   = CurrentPane.PointToScreen(new Point(e.X, e.Y)),
                Current = CurrentPane.PointToScreen(new Point(e.X, e.Y)),
                AffectedPaneInitialHeight = currentPane.Height,
                AdjacentPaneInitialHeight = pane2.Height
            };
            if (PaneFrameTool.PaneResizeStyle == PaneResizeStyle.Outline)
            {
                _screenGraphics = Chart.CreateGraphics();
                _backBuffer     = new MemGraphics(Chart.Width, Chart.Height);
                _frontBuffer    = new MemGraphics(Chart.Width, Chart.Height);
                _pen            = new Pen(Chart.visualSettings.PaneFrameToolOutlineColor, 2f);
                Chart.Draw(_backBuffer.Graphics);
                Rectangle clientRect = Chart.ClientRect;
                clientRect.Offset(CurrentPane.PaneFrame.LeftBorderWidth, CurrentPane.PaneFrame.TopBorderWidth);
                clientRect.Width  -= CurrentPane.PaneFrame.LeftBorderWidth + CurrentPane.PaneFrame.RightBorderWidth;
                clientRect.Height -= CurrentPane.PaneFrame.TopBorderWidth + CurrentPane.PaneFrame.BottomBorderWidth;
                _frontBuffer.Graphics.SetClip(clientRect);
                DrawOutline(_paneResizeEventArgs.AffectedPane.Bounds, _paneResizeEventArgs.AffectedPane.Bounds);
            }
        }
Ejemplo n.º 5
0
 internal override void StartDrag(MouseEventArgs e)
 {
     Pane currentPane;
     Pane pane2;
     bool flag = HitTestPaneBottomBorder(e.Y);
     HitTestPaneTopBorder(e.Y);
     int index = Chart.Panes.PositionList.IndexOf(CurrentPane);
     if (flag)
     {
         currentPane = CurrentPane;
         pane2 = (Pane)Chart.Panes.PositionList[index + 1];
     }
     else
     {
         currentPane = (Pane)Chart.Panes.PositionList[index - 1];
         pane2 = CurrentPane;
     }
     _paneResizeEventArgs = new PaneResizeEventArgs(currentPane, pane2)
                                {
                                    Start = CurrentPane.PointToScreen(new Point(e.X, e.Y)),
                                    Current = CurrentPane.PointToScreen(new Point(e.X, e.Y)),
                                    AffectedPaneInitialHeight = currentPane.Height,
                                    AdjacentPaneInitialHeight = pane2.Height
                                };
     if (PaneFrameTool.PaneResizeStyle == PaneResizeStyle.Outline)
     {
         _screenGraphics = Chart.CreateGraphics();
         _backBuffer = new MemGraphics(Chart.Width, Chart.Height);
         _frontBuffer = new MemGraphics(Chart.Width, Chart.Height);
         _pen = new Pen(Chart.visualSettings.PaneFrameToolOutlineColor, 2f);
         Chart.Draw(_backBuffer.Graphics);
         Rectangle clientRect = Chart.ClientRect;
         clientRect.Offset(CurrentPane.PaneFrame.LeftBorderWidth, CurrentPane.PaneFrame.TopBorderWidth);
         clientRect.Width -= CurrentPane.PaneFrame.LeftBorderWidth + CurrentPane.PaneFrame.RightBorderWidth;
         clientRect.Height -= CurrentPane.PaneFrame.TopBorderWidth + CurrentPane.PaneFrame.BottomBorderWidth;
         _frontBuffer.Graphics.SetClip(clientRect);
         DrawOutline(_paneResizeEventArgs.AffectedPane.Bounds, _paneResizeEventArgs.AffectedPane.Bounds);
     }
 }
Ejemplo n.º 6
0
 internal void FirePaneResize(PaneResizeEventArgs e)
 {
     if (PaneResize != null)
     {
         PaneResize(this, e);
     }
 }