예제 #1
0
        private int DrawRow(CustomHistoryRow row, Graphics g, int top, int visibleTop, int visibleBottom)
        {
            Rectangle rowbounds = new Rectangle(CustomHistoryRow.Margin.Left, top + CustomHistoryRow.Margin.Top,
                                                Width - CustomHistoryRow.Margin.Horizontal, Int32.MaxValue);

            return(row.DrawSelf(g, rowbounds, visibleTop, visibleBottom));
        }
예제 #2
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            base.OnMouseDown(e);
            int              top        = 0;
            Point            mousePoint = PointToClient(MousePosition);
            CustomHistoryRow row        = getRowFromPoint(mousePoint, ref top);

            if (row != null)
            {
                row.Click(new Point(mousePoint.X, mousePoint.Y - top), e.Button);
            }
        }
예제 #3
0
        protected override void OnMouseUp(MouseEventArgs e)
        {
            base.OnMouseUp(e);
            int              top        = 0;
            Point            mousePoint = PointToClient(MousePosition);
            CustomHistoryRow row        = getRowFromPoint(mousePoint, ref top);

            if (row != null)
            {
                row.MouseUp(new Point(mousePoint.X, mousePoint.Y - top), e.Button);
            }

            foreach (CustomHistoryRow r in Rows)
            {
                r.ButtonPressed = false;
            }
            Invalidate();
            Refresh();
        }
예제 #4
0
 public void AddItem(CustomHistoryRow row)
 {
     row.ParentPanel = this;
     Rows.Insert(0,row);
     Refresh();
 }
예제 #5
0
 private int DrawRow(CustomHistoryRow row, Graphics g, int top, int visibleTop, int visibleBottom)
 {
     Rectangle rowbounds = new Rectangle(CustomHistoryRow.Margin.Left, top + CustomHistoryRow.Margin.Top,
                                         Width - CustomHistoryRow.Margin.Horizontal, Int32.MaxValue);
     return row.DrawSelf(g, rowbounds, visibleTop, visibleBottom);
 }
예제 #6
0
 public void AddItem(CustomHistoryRow row)
 {
     row.ParentPanel = this;
     Rows.Insert(0, row);
     Refresh();
 }