private void RegisterUserBT_Click(object sender, EventArgs e) { if (userTB.Text == "username" || passwordTB.Text == "password") { FeedbackTxt("Wrong Data", Color.Red); } else { Pombos.AddUser(); timer1.Start(); timer1.Interval = 2000; } }
private void CheckUser() { if (UserNameTB.Text != "username" && PasswordTB.Text != "password") { //##section //***UNCOMMENT here when inserting the database link on the class Pombos ***// //try //{ // Pombos.ConnectPombosDB(); // if (Pombos.CheckUser(UserNameTB.Text, PasswordTB.Text)) // { // PomBotAppForm mainAppForm = new PomBotAppForm(); // mainAppForm.Show(); // Program.userName = UserNameTB.Text; // this.Hide(); // Pombos.DisconnectPombosDB(); // } // else // { // WrongUser("WRONG USER OR PASSWORD"); // } //} //catch (SqlException) //{ // WrongUser("404, NO INTERNET CONNECTION"); //} //***DELETE DOWN here when inserting the database link on the class Pombos ***// if (Pombos.CheckUser(UserNameTB.Text, PasswordTB.Text)) { PomBotAppForm mainAppForm = new PomBotAppForm(); mainAppForm.Show(); Program.userName = UserNameTB.Text; this.Hide(); } else { WrongUser("WRONG USER OR PASSWORD"); } //***DELETE UP } else { WrongUser("WRONG USER OR PASSWORD"); } SignInBT.Enabled = true; }
private void Updater() { if (File.Exists(@".\GObot.msi")) { File.Delete(@".\GObot.msi"); } if (Pombos.CheckUpdate()) { howToBT.ForeColor = Color.Aqua; updateGB.Visible = true; downloadPB.Visible = false; installUpdateGB.Visible = false; updateVersionTB.Text = $"Version {Pombos.appversion} available"; } else { howToBT.ForeColor = Color.Black; updateGB.Visible = false; installUpdateGB.Visible = false; } }