Beispiel #1
0
 public void onLoginFinished()
 {
     if (Program.isLoggedIn == true)
     {
         LoggedInForm lif = new LoggedInForm();
         lif.Location      = this.Location;
         lif.StartPosition = FormStartPosition.Manual;
         lif.FormClosing  += delegate { this.Show(); };
         lif.Show();
         this.Hide();
     }
 }
Beispiel #2
0
 private void login_button_Click(object sender, EventArgs e)
 {
     Program.username = this.login_textbox.Text;
     LoginService.login(this.login_textbox.Text, this.password_textbox.Text);
     if (Program.isLoggedIn == true)
     {
         LoggedInForm lif = new LoggedInForm();
         lif.Location      = this.Location;
         lif.StartPosition = FormStartPosition.Manual;
         lif.FormClosing  += delegate { this.Show(); };
         lif.Show();
         this.Hide();
     }
 }
Beispiel #3
0
 public void onLogin(Boolean loggedIn)
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new MethodInvoker(() => { onLogin(loggedIn); }));
         return;
     }
     if (loggedIn == true)
     {
         LoggedInForm lif = new LoggedInForm();
         lif.Location      = this.Location;
         lif.StartPosition = FormStartPosition.Manual;
         lif.FormClosing  += delegate { showForm(); };
         lif.Show();
         this.Hide();
     }
 }