private void sine_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            SineSignal sineSignal = sender as SineSignal;

            sineSignal.Update();
            if (!suppressSourceUpdate)
            {
                updateSource();
            }
        }
        private void btnAddSine_Click(object sender, RoutedEventArgs e)
        {
            SineSignal signal = new SineSignal();

            if (sources.Count > 0)
            {
                signal.SetSampleRate(sources[0].SampleRate);
                signal.SetNumberOfSamples(sources[0].NumberOfSamples);
            }
            else
            {
                GlobalSampleRate = signal.SampleRate;
            }
            signal.Update();

            sources.Add(signal);
            signal.PropertyChanged += new PropertyChangedEventHandler(sine_PropertyChanged);
            signal.PropertyChanged += new PropertyChangedEventHandler(signal_PropertyChanged);

            sourcesList.SelectedIndex = sources.IndexOf(signal);

            updateSource();
        }