Exemplo n.º 1
0
        private bool TableMouseUp(MouseEventArgs e)
        {
            if (PtInTableToolBar(e.X, e.Y))
            {
                if (FTableToolBar.ActiveIndex == 0)
                {
                    FTableToolBar.ActiveIndex = -1;
                    Point vPt = new Point(FTableToolBar.Left, FTableToolBar.Top + FTableToolBar.Height);
                    vPt = this.PointToScreen(vPt);
                    FTableToolMenu.Show(vPt.X, vPt.Y);
                }
                else
                {
                    MouseEventArgs vEvent = new MouseEventArgs(e.Button, e.Clicks, e.X - FTableToolBar.Left, e.Y - FTableToolBar.Top, e.Delta);
                    FTableToolBar.MouseUp(vEvent);
                    FTableToolBar.ActiveIndex = -1;
                }
                return(true);
            }
            else
            {
                FTableToolBar.ActiveIndex = -1;
            }

            return(false);
        }
Exemplo n.º 2
0
        private bool TableMouseUp(MouseEventArgs e)
        {
            if (PtInTableToolBar(e.X, e.Y))
            {
                MouseEventArgs vEvent = new MouseEventArgs(e.Button, e.Clicks, e.X - FTableToolBar.Left, e.Y - FTableToolBar.Top, e.Delta);
                FTableToolBar.MouseUp(vEvent);
                return(true);
            }
            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);
        }