protected override void OnMouseDown(MouseButtonEventArgs e) { base.OnMouseDown(e); // change track if (Selected != this) { SignalTrackStatic.Select(this); } }
private void addSignalTrack(Signal signal, Color signalColor, Color backgroundColor) { SignalTrack track = new SignalTrack(signal); control.signalTrackControl.Add(track, signalColor, backgroundColor); control.timeLineControl.rangeSlider.OnTimeRangeChanged += track.TimeRangeChanged; signals.Add(signal); signalTracks.Add(track); double duration = signal.number / signal.rate; updateTimeRange(duration, track); SignalTrackStatic.Select(track); updateNavigator(); }
private void removeSignalTrack(SignalTrack track) { if (track != null) { control.signalTrackControl.Remove(track); SignalTrackStatic.Unselect(); track.Children.Clear(); signalTracks.Remove(track); if (signalTracks.Count > 0) { SignalTrackStatic.Select(signalTracks[0]); } else { clearSignalInfo(); updateNavigator(); } } }