Beispiel #1
0
//- track management ----------------------------------------------------------

        public void addTrackView(X1Track track, int duration)
        {
            trackWidth = duration * zoomfactor;
            TrackView trackView = new TrackView(this, track, trackWidth);

            trackView.Location = new Point(0, tracks.Count * TrackView.TRACKHEIGHT + ruler.Height);
            tracksHeight      += TrackView.TRACKHEIGHT;
            this.Controls.Add(trackView);
            tracks.Add(trackView);
            this.Height++;              //trigger a resize to draw scrollbars if needed
        }
Beispiel #2
0
        public int zoomFactor;      //num pixels per sec

        public TrackData(TrackView _trackView)
        {
            trackView  = _trackView;
            waverly    = trackView.trackPanel.signalsWindow.waverly;
            trackNum   = trackView.track.number;
            zoomFactor = TrackPanel.ZOOMFACTOR;
            samplePos  = 0;

            this.Size      = new System.Drawing.Size(300, 128);
            this.BackColor = Color.LightGray;
            this.Paint    += paintTrackData;
        }
Beispiel #3
0
 public void deleteTrackView(TrackView trackView)
 {
     tracks.Remove(trackView);
     this.Controls.Remove(trackView);
     trackView.close();
     if (tracks.Count == 0)
     {
         trackWidth = 0;
     }
     tracksHeight -= TrackView.TRACKHEIGHT;
     for (int i = 0; i < tracks.Count; i++)
     {
         tracks[i].Top = (i * TrackView.TRACKHEIGHT + ruler.Height);
     }
     this.Height++;
 }