public RadioController() { _radio = new Radio(); _radio.ScanUpdated += (s, e) => ScanUpdated?.Invoke(this, new ScanUpdatedEventArgs(e.Frequency)); _radio.ScanCompleted += (s, e) => ScanCompleted?.Invoke(this, EventArgs.Empty); }
private void InitCallbacks() { _scanCompletedCallback = _ => ScanCompleted?.Invoke(this, EventArgs.Empty); _interruptedCallback = (reason, _) => Interrupted?.Invoke(this, new RadioInterruptedEventArgs(reason)); _scanUpdatedCallback = (frequency, _) => ScanUpdated?.Invoke(this, new ScanUpdatedEventArgs(frequency)); _scanStoppedCallback = _ => ScanStopped?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Invokes scan updates event handler. /// </summary> private void RaiseScanUpdated() { ScanUpdated?.Invoke(this, EventArgs.Empty); }