Ejemplo n.º 1
0
 private void nameBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         Instellingen userInstellingen = new Instellingen(nameBox.Text);
         //to do: save the user to a txt file and add the user to the total list of users (txt file)
         Beginscherm.Beginscherm beginScherm = new Beginscherm.Beginscherm(userInstellingen);
         this.Hide();
         beginScherm.Closed += (s, args) => this.Close();
         beginScherm.Show();
     }
     else
     {
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Opens a new form with the users previous results or opens a new form to create a new account.
 /// </summary>
 private void OpenNieuwScherm(string user)
 {
     //checks if it's an existing user
     if (!(user == "+"))
     {
         Instellingen userInstellingen = new Instellingen(user);
         userInstellingen = LoadSettings(user);
         Beginscherm.Beginscherm beginScherm = new Beginscherm.Beginscherm(userInstellingen);
         this.Hide();
         beginScherm.Closed += (s, args) => this.Close();
         beginScherm.Show();
     }
     else
     {
         var nieuweGebruikerScherm = new NieuweGebruiker();
         this.Hide();
         nieuweGebruikerScherm.Closed += (s, args) => this.Close();
         nieuweGebruikerScherm.Show();
     }
 }