HamBook – Rev 54

Subversion Repositories:
Rev:
using System.ComponentModel;
using System.Runtime.CompilerServices;
using Configuration.Annotations;

namespace Configuration
{
    public class Spectrogram : INotifyPropertyChanged
    {
        private int _audioBufferTimespan = 20;
        private int _fftSamples = 1024;
        private bool _pinToDesktop;
        private int _sampleRate = 8192;
        private int _spectrumIntensity = 5;

        public bool PinToDesktop
        {
            get => _pinToDesktop;
            set
            {
                if (value == _pinToDesktop) return;

                _pinToDesktop = value;
                OnPropertyChanged();
            }
        }

        public int SampleRate
        {
            get => _sampleRate;
            set
            {
                if (value == _sampleRate) return;

                _sampleRate = value;
                OnPropertyChanged();
            }
        }

        public int SpectrumIntensity
        {
            get => _spectrumIntensity;
            set
            {
                if (value == _spectrumIntensity) return;

                _spectrumIntensity = value;
                OnPropertyChanged();
            }
        }

        public int FftSamples
        {
            get => _fftSamples;
            set
            {
                if (value == _fftSamples) return;

                _fftSamples = value;
                OnPropertyChanged();
            }
        }

        public int AudioBufferTimespan
        {
            get => _audioBufferTimespan;
            set
            {
                if (value == _audioBufferTimespan) return;

                _audioBufferTimespan = value;
                OnPropertyChanged();
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        [NotifyPropertyChangedInvocator]
        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}

Generated by GNU Enscript 1.6.5.90.