Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 4th, 2012  |  syntax: None  |  size: 0.49 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. App freezes when wrong Baud Rate Selected c#
  2. try {
  3.   data = sp.Readline();
  4. }
  5. catch (TimeoutException errorEvent)
  6. {
  7.   //Write to console the errorEvent (This operation has timed out)
  8.   //Message to user to pick correct baud
  9.   tbConsole.AppendText(Environment.NewLine);
  10.   tbConsole.AppendText("Incorrect Baud Rate: Please select a new baud rate");
  11.   tbConsole.AppendText(Environment.NewLine);
  12.   tbConsole.AppendText(errorEvent.Message);
  13.   tbConsole.ScrollToEnd();
  14.   //Show baud rate settings dialog
  15. }