void Start() { this.DialogResult = DialogResult.OK; NewsMain form2 = new NewsMain(); form2.Show(); }
private void button3_Click(object sender, EventArgs e) { NewsMain form1 = new NewsMain(); form1.Show(); Hide(); }
private void button1_Click(object sender, EventArgs e) { if (tbxLogin.Text == string.Empty) { MessageBox.Show("Создайте логин"); return; } if (tbxPasword1.Text == string.Empty || tbxPasword2.Text == string.Empty) { MessageBox.Show("Поле с паролем не заполнено"); return; } if (tbxPasword1.Text != tbxPasword2.Text) { MessageBox.Show("Пароли не совпадают"); return; } if (Save(tbxLogin.Text, tbxPasword1.Text) == true) { DialogResult = DialogResult.OK; NewsMain form1 = new NewsMain(); form1.Show(); //this.Close(); } else { return; } }