Esempio n. 1
0
        private bool FindBack()
        {
            if (!AccountInfo.AccountChecked(account_textEdit.Text.Trim()))
            {
                XtraMessageBox.Show("输入的账号不存在,请重新输入");
                account_textEdit.Focus();
                return(false);
            }

            AccountInfo account = AccountInfo.FindBackChecked(account_textEdit.Text.Trim(), key_textEdit.Text.Trim());

            if (account == null)
            {
                XtraMessageBox.Show("账号或安全码输入有误,请重新输入");
                return(false);
            }

            //通过验证
            account.Password = password_textEdit.Text.Trim();
            account.Key      = RDS_Controller.Encryption.DecryptBase64(account.Key);
            if (AccountInfo.Modify(account) < 0)
            {
                return(false);
            }
            return(true);
        }
 private void account_textEdit_Leave(object sender, EventArgs e)
 {
     if (AccountInfo.AccountChecked(account_textEdit.Text.Trim()))
     {
         labelControl8.ForeColor = Color.Red;
         labelControl8.Text      = "存在相同的账号名了";
         account_textEdit.Focus();
     }
     else
     {
         labelControl8.ForeColor = System.Drawing.SystemColors.ControlDark;
         labelControl8.Text      = "请输入您的用户名";
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 登录函数
 /// </summary>
 /// <param name="Account"></param>
 /// <param name="Password"></param>
 /// <returns></returns>
 protected bool Login(string Account, string Password)
 {
     Password = Encryption.EncryptBase64(Password);
     //验证账号
     if (!AccountInfo.AccountChecked(Account))
     {
         XtraMessageBox.Show("输入的账号有误,请重新输入", "消息", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return(false);
     }
     //验证密码
     if (!AccountInfo.AccountFullChecked(Account, Password))
     {
         XtraMessageBox.Show("输入的密码有误,请重新输入!", "消息", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return(false);
     }
     return(true);
 }