/// <inheritdoc /> protected override void OnMouseDown(MouseEventArgs e) { Focus(); _mouseDownMark = null; Point location = _mouseDownLocation = TranslateLocation(e.Location); if (e.Button == MouseButtons.Left || e.Button == MouseButtons.Right) { _mouseDownMark = MarkAt(location); if (!CtrlPressed && !ShiftPressed) { if (!_marksSelectionManager.IsSelected(_mouseDownMark)) { _lastSingleSelectedMarkLocation = location; _marksSelectionManager.ClearSelected(); _marksSelectionManager.Select(_mouseDownMark); } } else if (ShiftPressed) { if (_lastSingleSelectedMarkLocation != Point.Empty) { SelectMarksBetween(_lastSingleSelectedMarkLocation, location); } } else { if (_marksSelectionManager.IsSelected(_mouseDownMark)) { _marksSelectionManager.DeSelect(_mouseDownMark); } else { _lastSingleSelectedMarkLocation = location; _marksSelectionManager.Select(_mouseDownMark); } } } if (e.Button == MouseButtons.Left) { if (_markResizeZone == ResizeZone.None) { // begin waiting for a normal drag WaitForDragMove(location); } else if (!CtrlPressed) { BeginHResize(location); // begin a resize. } } }
/// <inheritdoc /> protected override void OnMouseDown(MouseEventArgs e) { Focus(); _mouseDownMark = null; Point location = _mouseDownLocation = TranslateLocation(e.Location); if (e.Button == MouseButtons.Left || e.Button == MouseButtons.Right) { _mouseDownMark = MarkAt(location); if (e.Clicks == 2 && _mouseDownMark != null) { if (AltPressed) { BeginMoveResizeMarks(location); _mouseDownMark.Parent.FillGapTimes(_mouseDownMark); FinishedResizeMoveMarks(ElementMoveType.Resize); return; } _timeLineGlobalEventManager.OnPlayRange(new PlayRangeEventArgs(_mouseDownMark.StartTime, _mouseDownMark.EndTime)); return; } if (!CtrlPressed && !ShiftPressed) { if (!_marksSelectionManager.IsSelected(_mouseDownMark)) { _lastSingleSelectedMarkLocation = location; _marksSelectionManager.ClearSelected(); _marksSelectionManager.Select(_mouseDownMark); } } else if (ShiftPressed) { if (_lastSingleSelectedMarkLocation != Point.Empty) { SelectMarksBetween(_lastSingleSelectedMarkLocation, location); } } else { if (_marksSelectionManager.IsSelected(_mouseDownMark)) { _marksSelectionManager.DeSelect(_mouseDownMark); } else { _lastSingleSelectedMarkLocation = location; _marksSelectionManager.Select(_mouseDownMark); } } } if (e.Button == MouseButtons.Left) { if (_markResizeZone == ResizeZone.None) { // begin waiting for a normal drag WaitForDragMove(location); } else if (!CtrlPressed) { BeginHResize(location); // begin a resize. } } }