void refreshTick(object obj, EventArgs args) { Program.AssertOnEventThread(); Timer timer = (Timer)obj; ActionRow row = (ActionRow)timer.Tag; bool redraw = !Disposing && !IsDisposed && !Program.Exiting; bool kill = row.Action == null || row.Action.IsCompleted || !redraw; if (redraw) { // Redraw panel CustomHistoryPanel.Invalidate(); CustomHistoryPanel.Refresh(); } if (kill) { // Kill timer lock (refreshTimersLock) { refreshTimers.Remove(timer); } timer.Stop(); timer.Dispose(); } }
internal void Click(Point p, MouseButtons button) { if (button == MouseButtons.Left && ShowCancel && CancelEnabled) { Rectangle rect = CancelButtonRect(); if (rect.Contains(p)) { ButtonPressed = true; ParentPanel.Refresh(); } } }
protected override void OnMouseWheel(MouseEventArgs e) { base.OnMouseWheel(e); CustomHistoryPanel.ScrollTop = -this.AutoScrollPosition.Y; CustomHistoryPanel.Refresh(); }
protected override void OnSizeChanged(EventArgs e) { base.OnSizeChanged(e); CustomHistoryPanel.ScrollTop = -this.AutoScrollPosition.Y; CustomHistoryPanel.Refresh(); }