Пример #1
0
 // If error occured print a message indicating which one occurred. If the error is a group error (communication/fatal), quit
 public void showErrorMessage(LabJackUDException e)
 {
     Console.Out.WriteLine("Error: " + e.ToString());
     if (e.LJUDError > U3.LJUDERROR.MIN_GROUP_ERROR)
     {
         Console.ReadLine();                 // Pause for the user
         Environment.Exit(-1);
     }
 }
Пример #2
0
 public void ShowErrorMessage(LabJackUDException e)
 {
     //Called when an error occurred. When the error is a group error (communication/fatal), abort.
     evth.LogMessage(this, new LogEventArgs(LogLevel.ERROR, e.ToString()));
     if (e.LJUDError > U3.LJUDERROR.MIN_GROUP_ERROR)
     {
         Environment.Exit(-1);                                   //TODO: Test this! or just abort the thread.
     }
 }
Пример #3
0
        /// <summary>
        /// Displays the error on the GUI in a label
        /// </summary>
        /// <param name="e">The exception encountered</param>
        private void ShowErrorMessage(LabJackUDException e)
        {
            errorDisplay.Text = e.ToString();

            // Stop streaming if we are still streaming
            if (updateTimer.Enabled)
            {
                updateTimer.Enabled = false;
                StopStreaming();
            }
        }
Пример #4
0
        /// <summary>
        /// Displays the error on the GUI in a label in a thread safe way
        /// </summary>
        /// <param name="e">The exception encountered</param>
        private void ShowErrorMessage(LabJackUDException e)
        {
            // If we are not in the GUI thread, switch to GUI thread and run again
            if (InvokeRequired)
            {
                BeginInvoke(new ErrorParameterDelegate(ShowErrorMessage), new object[] { e });
            }
            else
            {
                errorDisplay.Text = e.ToString();

                // Stop streaming if we are still streaming
                if (streamRunning)
                {
                    streamRunning = false;
                    StopStreaming();
                }
            }
        }
Пример #5
0
        /// <summary>
        /// Displays the error on the GUI in a label in a thread safe way
        /// </summary>
        /// <param name="e">The exception encountered</param>
        private void ShowErrorMessage(LabJackUDException e)
        {
            // If we are not in the GUI thread, switch to GUI thread and run again
            if (InvokeRequired)
            {
                BeginInvoke(new ErrorParameterDelegate(ShowErrorMessage), new object[] { e });
            }
            else
            {
                MessageBox.Show(e.ToString());

                // Stop streaming if we are still streaming
                if (streamRunning)
                {
                    streamRunning = false;
                    stopStreaming();
                    btnStartStop.Text                = "Start";
                    gbxInstellingen.Enabled          = true;
                    frmExpert.groupBoxExpertSettings = true;
                }
            }
        }
Пример #6
0
 // If error occured print a message indicating which one occurred
 public void ShowErrorMessage(LabJackUDException exc)
 {
     errorDisplay.Text = "Error: " + exc.ToString();
 }
Пример #7
0
 // If error occured print a message indicating which one occurred. If the error is a group error (communication/fatal), quit
 public void showErrorMessage(LabJackUDException e)
 {
     Console.Out.WriteLine("Error: " + e.ToString());
     if (e.LJUDError > U3.LJUDERROR.MIN_GROUP_ERROR)
     {
         Console.ReadLine(); // Pause for the user
         Environment.Exit(-1);
     }
 }
Пример #8
0
        /// <summary>
        /// Displays the error on the GUI in a label
        /// </summary>
        /// <param name="e">The exception encountered</param>
        private void ShowErrorMessage(LabJackUDException e)
        {
            errorDisplay.Text = e.ToString();

            // Stop streaming if we are still streaming
            if (updateTimer.Enabled)
            {
                updateTimer.Enabled = false;
                StopStreaming();
            }
        }
Пример #9
0
        /// <summary>
        /// Displays the error on the GUI in a label in a thread safe way
        /// </summary>
        /// <param name="e">The exception encountered</param>
        private void ShowErrorMessage(LabJackUDException e)
        {
            // If we are not in the GUI thread, switch to GUI thread and run again
            if (InvokeRequired)
                BeginInvoke(new ErrorParameterDelegate(ShowErrorMessage), new object[]{e});
            else
            {
                errorDisplay.Text = e.ToString();

                // Stop streaming if we are still streaming
                if (streamRunning)
                {
                    streamRunning = false;
                    StopStreaming();
                }
            }
        }
Пример #10
0
 // If error occured print a message indicating which one occurred
 public void ShowErrorMessage(LabJackUDException exc)
 {
     errorDisplay.Text = exc.ToString();
 }
Пример #11
0
 // If error occured print a message indicating which one occurred. If the error is a group error (communication/fatal), quit
 public void ShowErrorMessage(LabJackUDException e)
 {
     MessageBox.Show(e.ToString());
 }
Пример #12
0
        /// <summary>
        /// Displays the error on the GUI in a label in a thread safe way
        /// </summary>
        /// <param name="e">The exception encountered</param>
        private void ShowErrorMessage(LabJackUDException e)
        {
            // If we are not in the GUI thread, switch to GUI thread and run again
            if (InvokeRequired)
                BeginInvoke(new ErrorParameterDelegate(ShowErrorMessage), new object[] { e });
            else
            {
                MessageBox.Show(e.ToString());

                // Stop streaming if we are still streaming
                if (streamRunning)
                {
                    streamRunning = false;
                    stopStreaming();
                    btnStartStop.Text = "Start";
                    gbxInstellingen.Enabled = true;
                    frmExpert.groupBoxExpertSettings = true;
                }
            }
        }