/// <summary> /// Associate the control with a track /// </summary> /// <param name="track"></param> public void Initialize(Track track) { this.track = track; textBoxTrackName.Text = track.Name; volumeSlider1.Volume = track.Volume; panSlider1.Pan = track.Pan; }
/// <summary> /// Creates a new trackview clicked event /// </summary> /// <param name="time">Time of the cusor</param> /// <param name="track">Track clicked on</param> /// <param name="clip">Any clip under the cursor</param> /// <param name="location">Mouse location</param> public TrackViewClickEventArgs(TimeSpan time, Track track, Clip clip, Point location) { this.time = time; this.track = track; this.clip = clip; this.location = location; }
private void PaintTrack(Track track, Graphics g) { foreach (Clip clip in track.Clips) { int clipX = TimeToX(clip.StartTime); g.TranslateTransform(clipX, 0); PaintClip(clip, track.Height, g); g.TranslateTransform(-clipX, 0); } }