コード例 #1
0
        /// <summary>
        /// Occurs when the user leaves the Username field.
        /// </summary>
        /// <param name="sender">The object sender</param>
        /// <param name="e">The event args</param>
        private void registerUsernameBox_Leave(object sender, EventArgs e)
        {
            //Check if username is unique in SQL - Error message: Username taken!
            bool verify = RegisterVerification.UsernameVerifacation(registerUsernameBox.Text);

            ChangeBackColorTextBox(registerUsernameBox, verify);
            _isUsernameOk = verify;
        }
コード例 #2
0
        /// <summary>
        /// Checks if username is ok on leave.
        /// </summary>
        /// <param name="sender">The object sender</param>
        /// <param name="e">The event args</param>
        private void usernameBox_Leave(object sender, EventArgs e)
        {
            if (usernameBox.Text == _user.Username)
            {
                usernameOk = true;
            }
            else
            {
                usernameOk = RegisterVerification.UsernameVerifacation(usernameBox.Text);
            }

            DefaultTextBox_Leave(usernameBox, usernameOk);
        }
コード例 #3
0
 public bool UsernameVerification_CheckInput(string username)
 {
     return(RegisterVerification.UsernameVerifacation(username));
 }