Beispiel #1
0
 private void btnSendSpaceRegister_Click(object sender, EventArgs e)
 {
     using (UserPassBox upb = SendSpaceRegister())
     {
         if (upb.Success)
         {
             txtSendSpaceUserName.Text = upb.UserName;
             txtSendSpacePassword.Text = upb.Password;
             atcSendSpaceAccountType.SelectedAccountType = AccountType.User;
         }
     }
 }
Beispiel #2
0
        public UserPassBox SendSpaceRegister()
        {
            UserPassBox upb = new UserPassBox("SendSpace Registration...", "John Doe", "*****@*****.**", "JohnDoe", "");

            upb.ShowDialog();
            if (upb.DialogResult == DialogResult.OK)
            {
                SendSpace sendSpace = new SendSpace(APIKeys.SendSpaceKey);
                upb.Success = sendSpace.AuthRegister(upb.UserName, upb.FullName, upb.Email, upb.Password);
                if (!upb.Success && sendSpace.Errors.Count > 0)
                {
                    MessageBox.Show(sendSpace.ToErrorString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            return(upb);
        }
 public UserPassBox SendSpaceRegister()
 {
     UserPassBox upb = new UserPassBox("SendSpace Registration...", "John Doe", "*****@*****.**", "JohnDoe", "");
     upb.ShowDialog();
     if (upb.DialogResult == DialogResult.OK)
     {
         SendSpace sendSpace = new SendSpace(APIKeys.SendSpaceKey);
         upb.Success = sendSpace.AuthRegister(upb.UserName, upb.FullName, upb.Email, upb.Password);
         if (!upb.Success && sendSpace.Errors.Count > 0)
         {
             MessageBox.Show(sendSpace.ToErrorString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     return upb;
 }