private void Logout() { user = null; EnableControls(); }
private void Login() { LoginWindow win = new LoginWindow(); win.ShowDialog(); string name = win.txtName.Text; string password = win.txtPassword.Password; win.Close(); user = data.AuthorizeUser(name, password); EnableControls(); }