private void btnRegister_Click(object sender, EventArgs e)
{
try
{
if (regForm.ShowDialog() == DialogResult.OK)
{
string userName = regForm.txtUserName.Text;
string password = regForm.txtPassword.Text;
string note = regForm.txtNote.Text.Trim();
if (note == String.Empty)
{
note = "N/A";
}
string centralIp = txtCentralIp.Text;
int centralPort = Convert.ToInt32(txtCentralPort.Text);
ics.RegisterUser(centralIp, centralPort, userName, password, note);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}