public ElementPitchedNote( ViewManager manager, Project.TrackPitchedNotes projectTrackPitchedNode, Project.PitchedNote pitchedNote) : base(manager) { this.projectTrackPitchedNode = projectTrackPitchedNode; this.projectPitchedNote = pitchedNote; this.interactableRegions = new List <InteractableRegion>(); this.segments = new List <Segment>(); this.timeRange = this.projectPitchedNote.timeRange; this.pitch = this.projectPitchedNote.pitch; this.assignedTrack = -1; for (var i = 0; i < this.manager.rows[0].trackSegments.Count; i++) { var trackPitchedNote = (this.manager.rows[0].trackSegments[i] as TrackSegmentPitchedNotes); if (trackPitchedNote != null && trackPitchedNote.projectTracks.Contains(this.projectTrackPitchedNode)) { this.assignedTrack = i; break; } } }
private void AddPitchedNoteTrack() { var newIndex = this.owner.currentProject.tracks.Count; var newTrack = new Project.TrackPitchedNotes("Track " + (newIndex + 1)); this.owner.currentProject.tracks.Add(newTrack); this.owner.editor.Rebuild(); this.RefreshTracks(); this.SelectTrack(newIndex); this.owner.Refresh(); }