Errors that occur after the connection is established, are sent through this method.
/// <summary>
/// Show occured error.
/// </summary>
/// <param name="sender"></param>
/// <param name="ErrorInfo"></param>
private void gxSerial1_OnError(object sender, string ErrorInfo)
{
try
{
gxSerial1.Close();
MessageBox.Show(ErrorInfo);
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
}
}
''' <summary>
''' Show occured error.
''' </summary>
Private Sub GxSerial1_OnError(ByVal sender As System.Object, ByVal ErrorInfo As System.String) Handles GxSerial1.OnError
Try
GxSerial1.Close()
MessageBox.Show(ErrorInfo)
Catch Ex As Exception
MessageBox.Show(Ex.Message)
End Try
End Sub
'Show errors
Private Sub GXSerial1_OnError(ByVal sender As Object, ByVal ErrorInfo As String)
On Error GoTo GXErr
GXSerial1.Close
MsgBox ErrorInfo
Exit Sub
GXErr:
MsgBox Err.Description
End Sub
Assembly: Gurux.Serial (Module: Gurux.Serial) Version: 5.0.0.2