private void enterButton_Click(object sender, EventArgs e) { if (_isRegister) { User newUser = new User(cardNumber.Text, login.Text, password.Text); Cinema.AddUser(newUser); Close(); } else { if (!Cinema.EnterCinema(login.Text, password.Text)) { MessageBox.Show("Incorrect login or password", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { Close(); } } }