private void btnContinue_Click(object sender, EventArgs e) { if( Utils.TextCheck(tbFirstName,tbSurname,tbAge)) { User.Forname = tbFirstName.Text; User.Surname = tbSurname.Text; User.HasProgrammedBefore = ProgrammedBefore; User.HasPorgrammedPythonBefore = ProgrammedPython; User.Age = int.Parse(tbAge.Text); if (Utilitys.Utils.debugging) { MessageBox.Show(this, "You entered: \nForname : " + UserHandler.User.Forname.ToString() + "\nSurname : " + UserHandler.User.Surname.ToString() + "\nAge : " + UserHandler.User.Age.ToString() + "\nHas Programmed Python : " + UserHandler.User.HasPorgrammedPythonBefore.ToString() + "\nHas Programmed before : " + UserHandler.User.HasProgrammedBefore.ToString(), "Debugging !", MessageBoxButtons.OK); } AppMain app = new AppMain(); EnableDoubleBuffering(); app.Show(); this.Hide(); } }
public void btnContinue_Click(object sender, EventArgs e) { if (UserHandler.User.Age > 0 && !string.IsNullOrEmpty(UserHandler.User.Forname) && !string.IsNullOrEmpty(UserHandler.User.Surname)) { AppMain appMain = new AppMain(); appMain.Show(); this.Hide(); } else { Connection connectionWindow = new Connection(); EnableDoubleBuffering(); connectionWindow.Show(); this.Hide(); } }