/// <summary> /// PauseSpectrum pauses the currently acquiring Spectrum. /// </summary> /// <param name="parameter">Object that is required by DelegateCommand</param> private void PauseSpectrum(Object parameter) { //Determine the type of Action based on the //label of the Pause button AcquisitionAction action = AcquisitionAction.Pause; if (this.PauseLabel != Strings.Pause) { action = AcquisitionAction.Restart; } //Publish the Event this._eventAggregator.GetEvent <ChangeAcquisitionEvent>().Publish(action); }
/// <summary> /// ChangeAcquisition performs the change to the /// Acquisition based on the action. /// </summary> private void ChangeAcquisition(AcquisitionAction action) { //Switch on the Action switch (action) { case AcquisitionAction.Pause: this.IsPaused = true; break; case AcquisitionAction.Restart: this.IsPaused = false; break; case AcquisitionAction.Stop: this.IsRunning = false; break; } //Fire the SpectrumChanged event this._eventAggregator.GetEvent <SpectrumChangedEvent>().Publish(this.GetActiveSpectrumInfo()); }