private void ics_RegistrationResponse(object sender, bool registrationSuccess, string messageFromServer)
{
Invoke(new MethodInvoker(delegate
{
if (registrationSuccess)
{
txtUserName.Text = regForm.txtUserName.Text;
txtPassword.Text = regForm.txtPassword.Text;
MessageBox.Show("User successfully registered, please login", "Success", MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
else
{
MessageBox.Show("Unable to register user : " + messageFromServer, "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
));
}