Example #1
0
 private void btnLogout_Click(object sender, EventArgs e)
 {
     CurrentUser = string.Empty;
     loginForm = new LoginForm(this);
     var result = loginForm.ShowDialog();
     if (result == DialogResult.Cancel)
     {
         this.Close();
     }
 }
Example #2
0
        public MainForm()
        {
            InitializeComponent();

            loginForm = new LoginForm(this);
            var result = loginForm.ShowDialog();
            if (result == DialogResult.Cancel)
            {
                this.Close();
            }
        }