// 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); } }
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. } }
/// <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(); } }
/// <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(); } } }
/// <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; } } }
// If error occured print a message indicating which one occurred public void ShowErrorMessage(LabJackUDException exc) { errorDisplay.Text = "Error: " + exc.ToString(); }
/// <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(); } } }
// If error occured print a message indicating which one occurred public void ShowErrorMessage(LabJackUDException exc) { errorDisplay.Text = exc.ToString(); }
// 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()); }
/// <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; } } }