private void CloseDevice() { if (this._airspyDevice == null) return; this._gui.Device = (AirSpyDevice) null; this._airspyDevice.SamplesAvailable -= new SamplesAvailableDelegate(this.AirSpyDevice_SamplesAvailable); this._airspyDevice.SampleRateChanged -= new EventHandler(this.AirSpyDevice_SampleRateChanged); this._airspyDevice.Dispose(); this._airspyDevice = (AirSpyDevice) null; }
public void SelectDevice(uint index) { this._airspyDevice = new AirSpyDevice(); this._airspyDevice.Frequency = (uint) this._frequency; this._gui.Device = this._airspyDevice; this._airspyDevice.SamplesAvailable += new SamplesAvailableDelegate(this.AirSpyDevice_SamplesAvailable); this._airspyDevice.SampleRateChanged += new EventHandler(this.AirSpyDevice_SampleRateChanged); }