コード例 #1
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();
     }
 }
コード例 #2
0
        internal override void FinishDrag(MouseEventArgs e)
        {
            if (PaneFrameTool.PaneMoveStyle == PaneMoveStyle.Blend)
            {
                _imageAttr.Dispose();
                _imageAttr   = null;
                _colorMatrix = null;
            }
            else
            {
                _pen.Dispose();
            }
            _screenGraphics.Dispose();
            _backBuffer.Dispose();
            _frontBuffer.Dispose();
            Point point = CurrentPane.ClientToChart(new Point(e.X, e.Y));
            Pane  topPane;

            if (point.Y < Chart.ClientRect.Top)
            {
                topPane = Chart.Panes.TopPane;
            }
            else if (point.Y > ((Chart.ClientRect.Bottom - 1) - Chart.Panes.XAxisPane.FixedHeight))
            {
                topPane = Chart.Panes.BottomPane;
            }
            else
            {
                topPane = Owner.FindPane(Chart.ClientRect.Left, point.Y);
            }
            if ((topPane != CurrentPane) && (topPane != null))
            {
                int index = Chart.Panes.PositionList.IndexOf(CurrentPane);
                if (Chart.Panes.PositionList.IndexOf(topPane) > index)
                {
                    Chart.Panes.PositionList.Remove(CurrentPane);
                    int num3 = Chart.Panes.PositionList.IndexOf(topPane);
                    Chart.Panes.PositionList.Insert(num3 + 1, CurrentPane);
                }
                else
                {
                    Chart.Panes.PositionList.Remove(CurrentPane);
                    int num4 = Chart.Panes.PositionList.IndexOf(topPane);
                    Chart.Panes.PositionList.Insert(num4, CurrentPane);
                }
            }
            Chart.PerformLayout();
        }
コード例 #3
0
ファイル: ZoomTool.cs プロジェクト: zhangjiayin/TradeSharp
        internal override void FinishDrag(MouseEventArgs e)
        {
            screenGraphics.Dispose();
            backBuffer.Dispose();
            frontBuffer.Dispose();
            pen.Dispose();
            brush.Dispose();

            var endLoc = new Point(e.X, e.Y);

            if (endLoc.X < CurrentPane.CanvasRect.Left)
            {
                endLoc.X = CurrentPane.CanvasRect.Left;
            }
            if (endLoc.X > (CurrentPane.CanvasRect.Right - 1))
            {
                endLoc.X = CurrentPane.CanvasRect.Right - 1;
            }
            SetWorldExtent(_startLoc, endLoc);
            Chart.Invalidate();
        }