示例#1
0
        protected override void OnMouseDown(MouseButtonEventArgs e)
        {
            base.OnMouseDown(e);

            // change track
            if (Selected != this)
            {
                SignalTrackStatic.Select(this);
            }
        }
示例#2
0
        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();
        }
示例#3
0
        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();
                }
            }
        }