private void label2_Click(object sender, EventArgs e) { Auth_Form auth = new Auth_Form(); auth.Show(); this.Close(); }
private void bunifuFlatButton1_Click(object sender, EventArgs e) { Auth_Form auth = new Auth_Form(); auth.Show(); for (int i = 0; i < 10; i++) { Thread.Sleep(60); this.Opacity = this.Opacity - 0.1; } for (int i = 0; i < 10; i++) { Thread.Sleep(60); this.Opacity = this.Opacity + 0.1; } this.Hide(); }
private void Reg_Click_1(object sender, EventArgs e) { try { using (var ctx = new Database.ApplicationContext()) { if (!email.Text.Contains("@gmail.com") && !email.Text.Contains("@yandex.by") && !email.Text.Contains("@mail.ru")) { Reg_Failed.Visible = true; return; } else { ctx.Users.Add(new User() { Email = email.Text, Password = password.Text }); ctx.SaveChanges(); } } } catch (Exception ex) { MessageBox.Show("Пользователь с таким e-mail уже зарегистрирован"); return; } Reg_Sucess.Visible = true; Auth_Form auth = new Auth_Form(); auth.Show(); this.Close(); }