Пример #1
0
        internal override void StartDrag(MouseEventArgs e)
        {
            _startLoc       = new Point(e.X, e.Y);
            _previousLoc    = new Point(e.X, e.Y);
            _screenGraphics = Chart.CreateGraphics();
            _backBuffer     = new MemGraphics(Chart.Width, Chart.Height);
            _frontBuffer    = new MemGraphics(Chart.Width, Chart.Height);
            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;
            clientRect.Height -= Chart.Panes.XAxisPane.FixedHeight;
            _frontBuffer.Graphics.SetClip(clientRect);
            if (PaneFrameTool.PaneMoveStyle == PaneMoveStyle.Outline)
            {
                _pen = new Pen(Chart.visualSettings.PaneFrameToolOutlineColor, 2f);
                DrawOutline(_previousLoc, _startLoc);
            }
            else
            {
                _imageAttr   = new ImageAttributes();
                _colorMatrix = new ColorMatrix();
                DrawImage(_previousLoc, _startLoc);
            }
        }
Пример #2
0
        internal override void StartDrag(MouseEventArgs e)
        {
            _startLoc      = new Point(e.X, e.Y);
            _previousLoc   = new Point(e.X, e.Y);
            screenGraphics = Chart.CreateGraphics();
            backBuffer     = new MemGraphics(Chart.Width, Chart.Height);
            frontBuffer    = new MemGraphics(Chart.Width, Chart.Height);
            Chart.Draw(backBuffer.Graphics);
            var rect = CurrentPane.ClientToChart(CurrentPane.CanvasRect);

            frontBuffer.Graphics.SetClip(rect);
            pen   = new Pen(ForeColor);
            brush = new SolidBrush(BackColor);
            DrawSelection(_startLoc, _startLoc);
        }
Пример #3
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);
            }
        }