/// <summary> /// Event handler when drag has finished /// </summary> void MoveFinished(object sender, WaveControl.CursorMovedEventArgs e) { Adjust(5); if (ChangesFinished != null) ChangesFinished(this, this); }
/// <summary> /// Event handler when End cursor is dragged /// </summary> void EndCursorMoved(object sender, WaveControl.CursorMovedEventArgs e) { // Adjust values (WaveControl already done, as it called us) end = e.Cursor.Position; float change = e.Cursor.Position - e.PreviousPosition; if (change != 0) { if ((e.ModifierKeys & Keys.Control) != 0 && GapChanged != null) { // Change all the gaps GapChanged(this, new CascadingEvent(this, -change)); } else if (e.Locked) { // Move start cursor for next track as well Start += change; if (StartChanged != null) { // Keep following track lengths the same StartChanged(this, new CascadingEvent(this, change)); } } } }