コード例 #1
0
        public virtual void OnMouseEnter(Point point)
        {
            System.Diagnostics.Trace.Assert(currentItem == null && currentRow == null);

            if (point.Y > RowHeight + Padding.Vertical)
            {
                Point rowRelativePoint;
                currentRow = SelectChild(point, out rowRelativePoint);
                if (currentRow == null)
                {
                    return;
                }

                currentRow.OnMouseEnter(rowRelativePoint);
            }
            else
            {
                Point itemRelativePoint;
                currentItem = GetItemFromPosition(point, out itemRelativePoint);
                if (currentItem == null)
                {
                    return;
                }

                currentItem.OnMouseEnter(itemRelativePoint);
            }
        }
コード例 #2
0
        protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);
            if (level1ColWidths == null)
            {
                level1ColWidths = level1Widths();
            }

            Point         rowRelativePoint;
            CustomListRow row = getRowFromPoint(e.Location, out rowRelativePoint);

            if (row != null && row == currentRow)
            {
                currentRow.OnMouseMove(rowRelativePoint);
                return;
            }

            if (currentRow != null)
            {
                currentRow.OnMouseLeave();
            }

            currentRow = row;

            if (currentRow != null)
            {
                currentRow.OnMouseEnter(rowRelativePoint);
            }
        }
コード例 #3
0
ファイル: CustomListRow.cs プロジェクト: huizh/xenadmin
        public virtual void OnMouseMove(Point point)
        {
            System.Diagnostics.Trace.Assert(currentItem == null || currentRow == null);

            if (point.Y > RowHeight + Padding.Vertical)
            {
                if (currentItem != null)
                {
                    currentItem.OnMouseLeave();
                    currentItem = null;
                }

                Point rowRelativePoint;
                CustomListRow row = SelectChild(point, out rowRelativePoint);

                if (row != null && currentRow == row)
                {
                    currentRow.OnMouseMove(rowRelativePoint);
                    return;
                }

                if (currentRow != null)
                    currentRow.OnMouseLeave();

                currentRow = row;

                if (currentRow != null)
                    currentRow.OnMouseEnter(rowRelativePoint);
            }
            else
            {
                if(currentRow != null)
                {
                    currentRow.OnMouseLeave();
                    currentRow = null;
                }
                
                Point itemRelativePoint;
                CustomListItem item = GetItemFromPosition(point, out itemRelativePoint);

                if (item != null && currentItem == item)
                {
                    currentItem.OnMouseMove(itemRelativePoint);
                    return;
                }

                if (currentItem != null)
                    currentItem.OnMouseLeave();

                currentItem = item;

                if (currentItem != null)
                    currentItem.OnMouseEnter(itemRelativePoint);
            }
        }
コード例 #4
0
ファイル: CustomListRow.cs プロジェクト: huizh/xenadmin
        public virtual void OnMouseEnter(Point point)
        {
            System.Diagnostics.Trace.Assert(currentItem == null && currentRow == null);

            if (point.Y > RowHeight + Padding.Vertical)
            {
                Point rowRelativePoint;
                currentRow = SelectChild(point, out rowRelativePoint);
                if (currentRow == null)
                    return;
                
                currentRow.OnMouseEnter(rowRelativePoint);
            }
            else
            {
                Point itemRelativePoint;
                currentItem = GetItemFromPosition(point, out itemRelativePoint);
                if (currentItem == null)
                    return;

                currentItem.OnMouseEnter(itemRelativePoint);
            }
        }
コード例 #5
0
        public virtual void OnMouseMove(Point point)
        {
            System.Diagnostics.Trace.Assert(currentItem == null || currentRow == null);

            if (point.Y > RowHeight + Padding.Vertical)
            {
                if (currentItem != null)
                {
                    currentItem.OnMouseLeave();
                    currentItem = null;
                }

                Point         rowRelativePoint;
                CustomListRow row = SelectChild(point, out rowRelativePoint);

                if (row != null && currentRow == row)
                {
                    currentRow.OnMouseMove(rowRelativePoint);
                    return;
                }

                if (currentRow != null)
                {
                    currentRow.OnMouseLeave();
                }

                currentRow = row;

                if (currentRow != null)
                {
                    currentRow.OnMouseEnter(rowRelativePoint);
                }
            }
            else
            {
                if (currentRow != null)
                {
                    currentRow.OnMouseLeave();
                    currentRow = null;
                }

                Point          itemRelativePoint;
                CustomListItem item = GetItemFromPosition(point, out itemRelativePoint);

                if (item != null && currentItem == item)
                {
                    currentItem.OnMouseMove(itemRelativePoint);
                    return;
                }

                if (currentItem != null)
                {
                    currentItem.OnMouseLeave();
                }

                currentItem = item;

                if (currentItem != null)
                {
                    currentItem.OnMouseEnter(itemRelativePoint);
                }
            }
        }
コード例 #6
0
ファイル: CustomListPanel.cs プロジェクト: huizh/xenadmin
        protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);
            if (level1ColWidths == null)
                level1ColWidths = level1Widths();

            Point rowRelativePoint;
            CustomListRow row = getRowFromPoint(e.Location, out rowRelativePoint);

            if (row != null && row == currentRow)
            {
                currentRow.OnMouseMove(rowRelativePoint);
                return;
            }

            if (currentRow != null)
                currentRow.OnMouseLeave();

            currentRow = row;

            if (currentRow != null)
                currentRow.OnMouseEnter(rowRelativePoint);
        }