예제 #1
0
파일: WPFControl.cs 프로젝트: zxscn/ReoGrid
        protected override void OnMouseUp(MouseButtonEventArgs e)
        {
            base.OnMouseUp(e);

            this.OnWorksheetMouseUp(e.GetPosition(this), WPFUtility.ConvertToUIMouseButtons(e));

            if (mouseCaptured)
            {
                ReleaseMouseCapture();
            }
        }
예제 #2
0
파일: WPFControl.cs 프로젝트: zxscn/ReoGrid
        protected override void OnMouseDown(System.Windows.Input.MouseButtonEventArgs e)
        {
            base.OnMouseDown(e);

            Focus();

            var pos = e.GetPosition(this);

            double right  = this.RenderSize.Width;
            double bottom = this.RenderSize.Height;

            if (this.verScrollbar.Visibility == Visibility.Visible)
            {
                right = Canvas.GetLeft(this.verScrollbar);
            }

            if (this.sheetTab.Visibility == Visibility.Visible)
            {
                bottom = Canvas.GetTop(this.sheetTab);
            }
            else if (this.horScrollbar.Visibility == Visibility.Visible)
            {
                bottom = Canvas.GetTop(this.horScrollbar);
            }

            if (pos.X < right && pos.Y < bottom)
            {
                if (e.ClickCount == 2)
                {
                    this.currentWorksheet.OnMouseDoubleClick(e.GetPosition(this), WPFUtility.ConvertToUIMouseButtons(e));
                }
                else
                {
                    this.OnWorksheetMouseDown(e.GetPosition(this), WPFUtility.ConvertToUIMouseButtons(e));
                    if (CaptureMouse())
                    {
                        mouseCaptured = true;
                    }
                }
            }
        }
예제 #3
0
파일: WPFControl.cs 프로젝트: zxscn/ReoGrid
        protected override void OnMouseWheel(MouseWheelEventArgs e)
        {
            base.OnMouseWheel(e);

            this.currentWorksheet.OnMouseWheel(e.GetPosition(this), e.Delta, WPFUtility.ConvertToUIMouseButtons(e));
        }
예제 #4
0
파일: WPFControl.cs 프로젝트: zxscn/ReoGrid
        protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);

            this.OnWorksheetMouseMove(e.GetPosition(this), WPFUtility.ConvertToUIMouseButtons(e));
        }