Beispiel #1
0
        private bool TableMouseMove(MouseEventArgs e)
        {
            if (PtInTableToolBar(e.X, e.Y))
            {
                if (FHotToolBar != FTableToolBar)
                {
                    if (FHotToolBar != null)
                    {
                        FHotToolBar.MouseLeave();
                    }

                    FHotToolBar = FTableToolBar;
                    FHotToolBar.MouseEnter();
                    this.Cursor = Cursors.Default;
                }
            }
            else
            if (FHotToolBar == FTableToolBar)
            {
                FTableToolBar.MouseLeave();
                FHotToolBar = null;
            }

            return(false);
        }
        private bool TableMouseMove(MouseEventArgs e)
        {
            if (PtInTableToolBar(e.X, e.Y))
            {
                if (FHotToolBar != FTableToolBar)
                {
                    if (FHotToolBar != null)
                    {
                        FHotToolBar.MouseLeave();
                    }

                    FHotToolBar = FTableToolBar;
                    FHotToolBar.MouseEnter();
                }
            }
            else
            if (FHotToolBar == FTableToolBar)
            {
                FTableToolBar.MouseLeave();
                FHotToolBar = null;
            }
            else
            //if FTableToolBar.ActiveIndex > 0 then  // 第一个是指针
            {
                HCTableItem vTableItem = FActiveItem as HCTableItem;
                if (HC.PtInRect(HC.Bounds(FActiveItemRect.Left, FActiveItemRect.Top, vTableItem.Width, vTableItem.Height),
                                new POINT(FMouseViewPt.X, FMouseViewPt.Y)))
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #3
0
        private bool ImageMouseMove(MouseEventArgs e)
        {
            if (PtInImageToolBar(e.X, e.Y))
            {
                if (FHotToolBar != FImageToolBar)
                {
                    if (FHotToolBar != null)
                    {
                        FHotToolBar.MouseLeave();
                    }

                    FHotToolBar = FImageToolBar;
                    FHotToolBar.MouseEnter();
                    this.Cursor = Cursors.Default;
                }
            }
            else
            if (FHotToolBar == FImageToolBar)
            {
                FImageToolBar.MouseLeave();
                FHotToolBar = null;
            }
            else
            //if FImageToolBar.ActiveIndex > 0 then  // 有效的样式、第一个是指针
            {
                HCImageItem vImageItem = FActiveItem as HCImageItem;
                if (HC.PtInRect(HC.Bounds(FActiveItemRect.Left, FActiveItemRect.Top, vImageItem.Width, vImageItem.Height),
                                new POINT(FMouseViewPt.X, FMouseViewPt.Y)))
                {
                    MouseEventArgs vEvent = new MouseEventArgs(e.Button, e.Clicks, FMouseViewPt.X - FActiveItemRect.Left, FMouseViewPt.Y - FActiveItemRect.Top, e.Delta);
                    if (vImageItem.ShapeManager.MouseMove(vEvent))
                    {
                        this.UpdateView(new RECT(FActiveItemRect.Left, FActiveItemRect.Top - FImageToolBar.Height, FActiveItemRect.Right, FActiveItemRect.Bottom));

                        if (vImageItem.ShapeManager.HotIndex >= 0)
                        {
                            Cursor = vImageItem.ShapeManager[vImageItem.ShapeManager.HotIndex].Cursor;
                        }

                        return(true);
                    }
                }
            }

            return(false);
        }