private void signin_Click(object sender, EventArgs e) { infoRegistration.Text = ""; if (isValid(emailtext.Text) && PassswordWithLogin(passwordtext.Text, logintext.Text)) { WorkServer workServer = new WorkServer(); /*workServer.createConnection();*/ workServer.addUser(logintext.Text, passwordtext.Text, emailtext.Text); /*workServer.loseConnection();*/ this.Hide(); } else { infoRegistration.Text = "Допущена ошибка при вводе данных."; } }