Пример #1
0
        ///////////////////////////////////////////////////////////////////////////////
        // Eventhandler for Custom Defined Events                                    //
        ///////////////////////////////////////////////////////////////////////////////
        #region CUSTOMEVENTHANDLER

        /// <summary>
        /// CalibrationDone Event
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">A <see cref="CalibrationDoneEventArgs"/> with the event data.</param>
        private void OnCalibrationDone(object sender, CalibrationDoneEventArgs e)
        {
            if (this.CalibrationDone != null)
            {
                this.CalibrationDone(sender, e);
            }
        }
Пример #2
0
        ///////////////////////////////////////////////////////////////////////////////
        // Eventhandler                                                              //
        ///////////////////////////////////////////////////////////////////////////////
        #region EVENTS

        ///////////////////////////////////////////////////////////////////////////////
        // Eventhandler for UI, Menu, Buttons, Toolbars etc.                         //
        ///////////////////////////////////////////////////////////////////////////////
        #region WINDOWSEVENTHANDLER

        /// <summary>
        /// Calibration Done Event handler. Updates the CalibrationPlot-Panel
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">An empty <see cref="EventArgs"/>.</param>
        private void aleaInterface_CalibrationDone(object sender, CalibrationDoneEventArgs e)
        {
            switch (e.Result)
            {
            case 0:
                this.resultLabel.Text = "Excellent";
                this.CalibrationResultPanel.BackColor = Color.Green;
                break;

            case 1:
                this.resultLabel.Text = "Good";
                this.CalibrationResultPanel.BackColor = Color.Green;
                break;

            case 2:
                this.resultLabel.Text = "Average";
                this.CalibrationResultPanel.BackColor = Color.Yellow;
                break;

            case 3:
                this.resultLabel.Text = "Poor";
                this.CalibrationResultPanel.BackColor = Color.Yellow;
                break;

            case 4:
                this.resultLabel.Text = "Very Poor";
                this.CalibrationResultPanel.BackColor = Color.Red;
                break;

            default:
                this.resultLabel.Text = "Invalid";
                this.CalibrationResultPanel.BackColor = Color.Red;
                break;
            }

            // Hide the track status and show the calibration plot.
            // this.HideTrackstatusWindow();
            this.ShowCalibPlot();
        }
Пример #3
0
    ///////////////////////////////////////////////////////////////////////////////
    // Eventhandler for Custom Defined Events                                    //
    ///////////////////////////////////////////////////////////////////////////////
    #region CUSTOMEVENTHANDLER

    /// <summary>
    /// CalibrationDone Event
    /// </summary>
    /// <param name="sender">Source of the event.</param>
    /// <param name="e">A <see cref="CalibrationDoneEventArgs"/> with the event data.</param>
    private void OnCalibrationDone(object sender, CalibrationDoneEventArgs e)
    {
      if (this.CalibrationDone != null)
      {
        this.CalibrationDone(sender, e);
      }
    }
Пример #4
0
    ///////////////////////////////////////////////////////////////////////////////
    // Eventhandler                                                              //
    ///////////////////////////////////////////////////////////////////////////////
    #region EVENTS

    ///////////////////////////////////////////////////////////////////////////////
    // Eventhandler for UI, Menu, Buttons, Toolbars etc.                         //
    ///////////////////////////////////////////////////////////////////////////////
    #region WINDOWSEVENTHANDLER

    /// <summary>
    /// Calibration Done Event handler. Updates the CalibrationPlot-Panel
    /// </summary>
    /// <param name="sender">Source of the event.</param>
    /// <param name="e">An empty <see cref="EventArgs"/>.</param>
    private void aleaInterface_CalibrationDone(object sender, CalibrationDoneEventArgs e)
    {
      switch (e.Result)
      {
        case 0:
          this.resultLabel.Text = "Excellent";
          this.CalibrationResultPanel.BackColor = Color.Green;
          break;
        case 1:
          this.resultLabel.Text = "Good";
          this.CalibrationResultPanel.BackColor = Color.Green;
          break;
        case 2:
          this.resultLabel.Text = "Average";
          this.CalibrationResultPanel.BackColor = Color.Yellow;
          break;
        case 3:
          this.resultLabel.Text = "Poor";
          this.CalibrationResultPanel.BackColor = Color.Yellow;
          break;
        case 4:
          this.resultLabel.Text = "Very Poor";
          this.CalibrationResultPanel.BackColor = Color.Red;
          break;
        default:
          this.resultLabel.Text = "Invalid";
          this.CalibrationResultPanel.BackColor = Color.Red;
          break;
      }

      // Hide the track status and show the calibration plot.
      // this.HideTrackstatusWindow();
      this.ShowCalibPlot();
    }