Ejemplo n.º 1
0
        public PowerSpectrumPanel(SignalRecorderPanel controlPanel)
        {
            InitializeComponent();
            _controlPanel = controlPanel;
            _buffer       = new Queue <float>();
            _timer        = new Timer(state => Invalidate(), null, 100, _timerPeriod);
            _gridPen      = new Pen(Color.Gray, 1.0f)
            {
                DashStyle = DashStyle.Dash
            };
            _gridFont = new Font("Arial", 8f);

            PowerSpectrum = this;
        }
        public void Initialize(ISharpControl control)
        {
            MainControl = control;

            control.PropertyChanged += ControlOnPropertyChanged;

            _controlPanel = new SignalRecorderPanel();
            _controlPanel.PowerMonitorChanged += OnPowerMonitorChanged;

            _powerSpectrumPanel = new PowerSpectrumPanel(_controlPanel);
            OnPowerMonitorChanged();

            control.RegisterFrontControl(_powerSpectrumPanel, PluginPosition.Bottom);
            control.RegisterStreamHook(this, ProcessorType.RawIQ);
        }