public RtlSdrControllerDialog(RtlSdrIO owner)
        {
            InitializeComponent();

            _owner = owner;
            var devices = DeviceDisplay.GetActiveDevices();

            deviceComboBox.Items.Clear();
            deviceComboBox.Items.AddRange(devices);

            frequencyCorrectionNumericUpDown.Value = Utils.GetIntSetting("RTLFrequencyCorrection", 0);
            samplerateComboBox.SelectedIndex       = Utils.GetIntSetting("RTLSampleRate", 3);
            samplingModeComboBox.SelectedIndex     = Utils.GetIntSetting("RTLSamplingMode", 0);
            offsetTuningCheckBox.Checked           = Utils.GetBooleanSetting("RTLOffsetTuning");
            rtlAgcCheckBox.Checked   = Utils.GetBooleanSetting("RTLChipAgc");
            tunerAgcCheckBox.Checked = Utils.GetBooleanSetting("RTLTunerAgc");
            tunerGainTrackBar.Value  = Utils.GetIntSetting("RTLTunerGain", 0);

            tunerAgcCheckBox.Enabled     = samplingModeComboBox.SelectedIndex == 0;
            gainLabel.Visible            = tunerAgcCheckBox.Enabled && !tunerAgcCheckBox.Checked;
            tunerGainTrackBar.Enabled    = tunerAgcCheckBox.Enabled && !tunerAgcCheckBox.Checked;
            offsetTuningCheckBox.Enabled = samplingModeComboBox.SelectedIndex == 0;

            _initialized = true;
        }
Example #2
0
 public RtlSdrControllerDialog(RtlSdrIO owner)
 {
     this.InitializeComponent();
     this._owner = owner;
     DeviceDisplay[] activeDevices = DeviceDisplay.GetActiveDevices();
     this.deviceComboBox.Items.Clear();
     this.deviceComboBox.Items.AddRange(activeDevices);
     this.frequencyCorrectionNumericUpDown.Value = Utils.GetIntSetting("RTLFrequencyCorrection", 0);
     this.samplerateComboBox.SelectedIndex       = Utils.GetIntSetting("RTLSampleRate", 3);
     this.samplingModeComboBox.SelectedIndex     = Utils.GetIntSetting("RTLSamplingMode", 0);
     this.offsetTuningCheckBox.Checked           = Utils.GetBooleanSetting("RTLOffsetTuning");
     this.rtlAgcCheckBox.Checked       = Utils.GetBooleanSetting("RTLChipAgc");
     this.tunerAgcCheckBox.Checked     = Utils.GetBooleanSetting("RTLTunerAgc");
     this.lnaGainTrackBar.Value        = Utils.GetIntSetting("LNAGain", 0);
     this.mixerGainTrackBar.Value      = Utils.GetIntSetting("MixerGain", 0);
     this.vgaGainTrackBar.Value        = Utils.GetIntSetting("VGAGain", 0);
     this.tunerAgcCheckBox.Enabled     = (this.samplingModeComboBox.SelectedIndex == 0);
     this.vgaGainTrackBar.Enabled      = (this.tunerAgcCheckBox.Enabled && !this.tunerAgcCheckBox.Checked);
     this.offsetTuningCheckBox.Enabled = (this.samplingModeComboBox.SelectedIndex == 0);
     this._initialized = true;
 }
        public RtlSdrControllerDialog(RtlSdrIO owner)
        {
            InitializeComponent();

            _owner = owner;
            var devices = DeviceDisplay.GetActiveDevices();
            deviceComboBox.Items.Clear();
            deviceComboBox.Items.AddRange(devices);

            frequencyCorrectionNumericUpDown.Value = Utils.GetIntSetting("RTLFrequencyCorrection", 0);
            samplerateComboBox.SelectedIndex = Utils.GetIntSetting("RTLSampleRate", 3);
            samplingModeComboBox.SelectedIndex = Utils.GetIntSetting("RTLSamplingMode", 0);
            offsetTuningCheckBox.Checked = Utils.GetBooleanSetting("RTLOffsetTuning");
            rtlAgcCheckBox.Checked = Utils.GetBooleanSetting("RTLChipAgc");
            tunerAgcCheckBox.Checked = Utils.GetBooleanSetting("RTLTunerAgc");
            tunerGainTrackBar.Value = Utils.GetIntSetting("RTLTunerGain", 0);

            tunerAgcCheckBox.Enabled = samplingModeComboBox.SelectedIndex == 0;
            gainLabel.Visible = tunerAgcCheckBox.Enabled && !tunerAgcCheckBox.Checked;
            tunerGainTrackBar.Enabled = tunerAgcCheckBox.Enabled && !tunerAgcCheckBox.Checked;
            offsetTuningCheckBox.Enabled = samplingModeComboBox.SelectedIndex == 0;

            _initialized = true;
        }