/// <summary> /// GetActiveSpectrumInfo centralizes the code to /// setup an ActiveSpectrumInfo /// </summary> /// <returns></returns> private ActiveSpectrumInfo GetActiveSpectrumInfo() { //Create a new ActiveSpectrumInfo ActiveSpectrumInfo rtn = new ActiveSpectrumInfo(); //Setup the values rtn.IsPaused = this._isPaused; rtn.IsRunning = this._isRunning; rtn.ChartPosition = this._currPoint; //Return the result return(rtn); }
/// <summary> /// SetAcquisitionControls sets up the Properties that /// change based on whether the Spectrum is acquiring /// data or not. /// </summary> /// <param name="info"></param> private void SetAcquisitionControls(ActiveSpectrumInfo info) { //Set the acquistion controls based on the Booleans this.AcquisitionRunning = info.IsRunning; this.NewEnabled = !(info.IsRunning); if (info.IsPaused == false) { this.PauseImageSource = new BitmapImage(new PackUri(Strings.SHArKCommonName, Strings.PauseImageSource)); this.PauseLabel = Strings.Pause; this.PauseScreenTipDesc = Strings.PauseScreenTipDesc; } else { this.PauseImageSource = new BitmapImage(new PackUri(Strings.SHArKCommonName, Strings.RestartImageSource)); this.PauseLabel = Strings.Restart; this.PauseScreenTipDesc = Strings.RestartScreenTipDesc; } }
/// <summary> /// OnSpectrumChanged is called when the user has /// done something to change the values in the Shell /// about the active Spectrum. /// </summary> /// <param name="info">The ActiveSpectrumInfo sent by the Tab</param> private void OnSpectrumChanged(ActiveSpectrumInfo info) { //Set the properties from the input this.ChartPosition = info.ChartPosition; }
/// <summary> /// OnSpectrumZoomed is called when a Spectrum has /// been Zoomed. /// </summary> /// <param name="parameter"></param> private void OnSpectrumChanged(ActiveSpectrumInfo info) { //Set the acquisition Controls this.SetAcquisitionControls(info); }