private void btnLogin_Click(object sender, EventArgs e) { LoginDlg dlg = new LoginDlg(_logger); DialogResult dlgresult = dlg.ShowDialog(); if (dlgresult == DialogResult.OK) { Cursor = Cursors.WaitCursor; _logger.Log("Trying to connect to EIB Server..."); bool result = dlg.Login(_server); if (result) { UpdateUI(); _logger.Log("Connection to EIB Server Success!"); } else { _logger.Log("Connection to EIB Server Failed!"); } Cursor = Cursors.Default; } }