private void btnLogout_Click(object sender, EventArgs e) { try { client.Logout(); txtResult.Text = "Logout"; } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }