Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `public delegate void OnLoginFailedEvent(
- FailReason Reason
- Public Event OnLoginFailed()
- Public Delegate Sub OEC_OnLoginFailedEvent(ByVal FailReason As OEC.Data.FailReason)
- Private Sub btnConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConnect.Click
- If txbUsername.Text = Nothing Or txbPassword.Text = Nothing Or txbServer.Text = Nothing Then
- 'Connect to the server, if the details are wrong then show the error message in the label.
- MsgBox("One of your required fields are empty, Please try again.", MsgBoxStyle.Critical, "Application Error")
- Else
- 'Catch Exception
- '
- Try
- OECClient1.Disconnect()
- OECClient1.Connect(txbServer.Text, txbPort.Text, txbUsername.Text, txbPassword.Text, False)
- Catch ex As Exception
- MessageBox.Show(ex.Message)
- End Try
- End If
- End Sub
- Public Sub OnLoginFailure() Handles OECClient1.OnLoginFailedEvent
- 'Do something upon failure here...
- End Sub
Add Comment
Please, Sign In to add comment