private void buttonNotAnunymos_Click(object sender, EventArgs e) { if (radioButtonLogin.Checked == true) { user = Login(textBoxName.Text, textBoxPassword.Text); if (user != null) { priceCompareForm = new PriceCompareForm(user); priceCompareForm.ShowDialog(); this.Close(); } else { MessageBox.Show("Error!\nPlease enter valid name and password!!"); } } else if (radioButtonResgister.Checked == true) { user = Register(textBoxName.Text, textBoxPassword.Text); if (user != null) { priceCompareForm = new PriceCompareForm(user); priceCompareForm.ShowDialog(); this.Close(); } else { MessageBox.Show("Error!\nPlease enter name and password again!\nMaybe this name is already in the system."); } } else { MessageBox.Show("Please select one of the radio buttons!"); } }
private void buttonAnonymous_Click(object sender, EventArgs e) { priceCompareForm = new PriceCompareForm(null); priceCompareForm.ShowDialog(); }