Пример #1
0
 private void SignUpBtn_Click(object sender, EventArgs e)
 {
     UserName = LoginBox.Text;
     Password = PasswordBox.Text;
     if (IsLoginCorrect(UserName) && IsPasswordCorrect(Password))
     {
         try
         {
             currentClient.Connect();
             if (currentClient.SendSignUpData(UserName, Password))
             {
                 fmain.IsLogin            = true;
                 fmain.UserNameLabel.Text = UserName;
                 this.Hide();
             }
         }
         catch
         {
             MessageBox.Show("Ошибка связи с сервером!");
         }
     }
 }