private void UnHideLoginComp() { EmailTextB.Show(); PassTextB.Show(); LoginButton.Show(); EmailLabel.Show(); PassLabel.Show(); }
/* private void SetBalloonTip() * { * notifyIcon1.Icon = SystemIcons.Exclamation; * notifyIcon1.BalloonTipTitle = "Balloon Tip Title"; * notifyIcon1.BalloonTipText = "Balloon Tip Text."; * notifyIcon1.BalloonTipIcon = ToolTipIcon.Error; * this.Click += new EventHandler(Form1_Click); * } * * void Form1_Click(object sender, EventArgs e) * { * notifyIcon1.Visible = true; * notifyIcon1.ShowBalloonTip(30000); * } */ public bool IsValid(string emailBoss) { Regex check = new Regex(@"^\w+[\w-\.]+\@\w{5}\.[a-z]{2,3}$"); bool valid; valid = check.IsMatch(emailBoss); if (valid == true) { return(true); } else { SetBalloonTip(); notifyIcon1.Visible = true; notifyIcon1.ShowBalloonTip(30); EmailLabel.Show(); return(false); } }
private void RegistrationButton_Click(object sender, EventArgs e) { if (registration) { LastNameTextBox.Hide(); EmailTextBox.Hide(); label1.Text = "Вход"; LoginLabel.Text = "Логин"; LastNameLabel.Hide(); EmailLabel.Hide(); GenderLabel.Hide(); GenderComboBox.Hide(); BirthDateLabel.Hide(); BirthDateTimePicker.Hide(); LoginButton.Text = "Войти"; RegistrationButton.Text = "Регистрация"; RobotCheckBox.Text = "Я не робот"; registration = false; } else { LastNameTextBox.Show(); EmailTextBox.Show(); label1.Text = "Регистрация"; LoginLabel.Text = "Имя"; LastNameLabel.Show(); EmailLabel.Show(); GenderLabel.Show(); GenderComboBox.Show(); BirthDateLabel.Show(); BirthDateTimePicker.Show(); LoginButton.Text = "Создать"; RegistrationButton.Text = "Авторизация"; RobotCheckBox.Text = "Принимаю условия\nсоглашения и т.д."; registration = true; } }