protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.Left) { currentMs -= 25; } else if (e.KeyCode == Keys.Right) { currentMs += 25; } CursorPositionChangedHanlder temp = CursorPositionChanged; if (temp != null) { temp(currentMs); } base.OnKeyDown(e); }
protected override void OnMouseUp(MouseEventArgs e) { if (anim == null) { return; } this.Focus(); int totalDuration = anim.Flow.TotalDuration; int ms = (int)(((float)e.X / (float)Width) * totalDuration); CursorPositionChangedHanlder temp = CursorPositionChanged; if (temp != null) { temp(ms); } base.OnMouseUp(e); }