private void EnterButton_Click(object sender, EventArgs e) { if ((UserIdText.Text.Length != 6 || PasswordText.Text.Length != 8)) { MessageBox.Show("Account Number should be 6 character. Password should be 8 character, Please Try Again.", "Notice", MessageBoxButtons.OK); UserIdText.Clear(); PasswordText.Clear(); } else { if ((client = AccountHolders.FindClient(UserIdText.Text, "Account Number")) == null) { MessageBox.Show("Account Number or Password is Incorrect, Please Try Again.", "Notice", MessageBoxButtons.OK); PasswordText.Clear(); } else { if (client.Check(PasswordText.Text) && client.IsLocked()) { AccountScreen accountScreen = new AccountScreen(UserIdText.Text); this.Hide(); accountScreen.Show(); PasswordText.Clear(); } else { Logger(); MessageBox.Show("Account Number or Password is Incorrect, Please Try Again.", "Notice", MessageBoxButtons.OK); PasswordText.Clear(); } } } }
void ReleaseDesignerOutlets() { if (btnRestoreData != null) { btnRestoreData.Dispose(); btnRestoreData = null; } if (btnStoreData != null) { btnStoreData.Dispose(); btnStoreData = null; } if (lblResult != null) { lblResult.Dispose(); lblResult = null; } if (PasswordText != null) { PasswordText.Dispose(); PasswordText = null; } if (txtPassword != null) { txtPassword.Dispose(); txtPassword = null; } }
void ReleaseDesignerOutlets() { if (ConfirmPasswordText != null) { ConfirmPasswordText.Dispose(); ConfirmPasswordText = null; } if (EmailText != null) { EmailText.Dispose(); EmailText = null; } if (PasswordText != null) { PasswordText.Dispose(); PasswordText = null; } if (SignUpButton != null) { SignUpButton.Dispose(); SignUpButton = null; } if (UsernameText != null) { UsernameText.Dispose(); UsernameText = null; } }
public bool Validate() { var result = PasswordText.Count(x => x.ToString() == UniqueChar); var data = MinLength <= result && MaxLength >= result; return(data); }
void ReleaseDesignerOutlets() { if (LoginButton != null) { LoginButton.Dispose(); LoginButton = null; } if (PasswordText != null) { PasswordText.Dispose(); PasswordText = null; } if (RegisterButton != null) { RegisterButton.Dispose(); RegisterButton = null; } if (UsernameText != null) { UsernameText.Dispose(); UsernameText = null; } }
public void ForConstructorTrueAndTextNUllShouldReturnnull() { var isTrue = new PasswordText("true"); IMatch actual = isTrue.Match(null); Assert.Null(actual.RemainingText()); }
public void ReturnFromRegistration() { HeadingText.GetComponent <TextMeshProUGUI>().text = "User Login"; LoginButton.SetActive(true); LoginButtonCover.SetActive(true); UserLoginText.SetActive(true); PasswordText.SetActive(true); RegisterButton.SetActive(true); //RegisterName, RegisterPassword, RegisterLocation, RegisterAge, SubmitCoverButton, SubmitButton; RegisterName.SetActive(false); RegisterPassword.SetActive(false); RegisterLocation.SetActive(false); RegisterAge.SetActive(false); SubmitCoverButton.SetActive(false); SubmitButton.SetActive(false); Registering = false; if (netManager) { if (netManager.IsConnectedToServer()) { netManager.AttemptAccountCreation(RegisterName.GetComponent <TMP_InputField>().text, RegisterPassword.GetComponent <TMP_InputField>().text); } } }
public void ForConstructorFalseAndTextEmptyStringShouldReturnFalse() { var isFalse = new PasswordText("false"); IMatch actual = isFalse.Match(string.Empty); Assert.False(actual.Succes()); }
public void ForConstructorFalseAndTextNullShouldReturnNull() { var isFalse = new PasswordText("false"); IMatch actual = isFalse.Match(null); Assert.Null(actual.RemainingText()); }
public void ForConstructorFalseAndTextFalseShouldReturnTextEmprtyString() { var isFalse = new PasswordText("false"); IMatch actual = isFalse.Match("false"); Assert.Equal(string.Empty, actual.RemainingText()); }
public void ForConstructorFalseAndTextFalsexShouldReturnTextx() { var isFalse = new PasswordText("false"); IMatch actual = isFalse.Match("falsex"); Assert.Equal("x", actual.RemainingText()); }
void ReleaseDesignerOutlets() { if (ErrorText != null) { ErrorText.Dispose(); ErrorText = null; } if (LoginButton != null) { LoginButton.Dispose(); LoginButton = null; } if (PasswordText != null) { PasswordText.Dispose(); PasswordText = null; } if (SignupButton != null) { SignupButton.Dispose(); SignupButton = null; } if (UsernameText != null) { UsernameText.Dispose(); UsernameText = null; } }
/// <summary> /// Validating user inputs /// </summary> private bool ValidateParameters() { if (string.IsNullOrWhiteSpace(UrlText.Text)) { MessageBox.Show("Please enter SharePoint Url value."); UrlText.Focus(); return(false); } if (string.IsNullOrWhiteSpace(UserText.Text)) { MessageBox.Show("Please enter User value."); UserText.Focus(); return(false); } if (string.IsNullOrWhiteSpace(PasswordText.Text)) { MessageBox.Show("Please enter Password."); PasswordText.Focus(); return(false); } return(true); }
private void PasswordGotFocus(object sender, RoutedEventArgs e) { PasswordWatermark.Opacity = 0; PasswordText.Opacity = 100; PasswordText.SelectAll(); }
public void ForConstructorTrueAndTextEmptyStringShouldReturnEmptyString() { var isTrue = new PasswordText("true"); IMatch actual = isTrue.Match(string.Empty); Assert.Equal(string.Empty, actual.RemainingText()); }
public void ForConstructorEmptyStringAndTextTrueShouldReturnTrue() { var isFalse = new PasswordText(string.Empty); IMatch actual = isFalse.Match("true"); Assert.True(actual.Succes()); }
public void ForConstructorTrueAndTextNullShouldReturnFalse() { var isTrue = new PasswordText("true"); IMatch actual = isTrue.Match(null); Assert.False(actual.Succes()); }
public void ForConstructorEmptyStringAndTextTrueShouldReturnTextTrue() { var isFalse = new PasswordText(string.Empty); IMatch actual = isFalse.Match("true"); Assert.Equal("true", actual.RemainingText()); }
public void ForConstructorFalseAndTextFalseShouldReturnTrue() { var isFalse = new PasswordText("false"); IMatch actual = isFalse.Match("false"); Assert.True(actual.Succes()); }
public void ForConstructorEmptyStringAndTextNullShouldReturnFalse() { var isFalse = new PasswordText(string.Empty); IMatch actual = isFalse.Match(null); Assert.False(actual.Succes()); }
// Update is called once per frame void Update() { if (!loggingIn && !loggedIn && !Registering) { if (UserLoginText.GetComponent <TMP_InputField>().text != "" && PasswordText.GetComponent <TMP_InputField>().text != "") { LoginButton.SetActive(true); LoginButtonCover.SetActive(false); } else { LoginButton.SetActive(false); LoginButtonCover.SetActive(true); } } if (Registering) { if (RegisterName.GetComponent <TMP_InputField>().text != "" && RegisterPassword.GetComponent <TMP_InputField>().text != "" && RegisterAge.GetComponent <TMP_InputField>().text != "" && RegisterLocation.GetComponent <TMP_InputField>().text != "") { SubmitCoverButton.SetActive(false); SubmitButton.SetActive(true); } else { SubmitCoverButton.SetActive(true); SubmitButton.SetActive(false); } } if (loggingIn) { if (loginConfirmed) { fakeLoginCount++; if (fakeLoginCount > 180) { LoggedIn(); loggingIn = false; fakeLoginCount = 0; } } } if (loginFailed) { errorCount++; if (errorCount > 250) { loginFailed = false; errorCount = 0; ErrorMessageBacking.SetActive(false); ErrorMessageText.SetActive(false); } } }
public void ForConstructorEmptyStringAndTextNullShouldReturnnull() { var isFalse = new PasswordText(string.Empty); IMatch actual = isFalse.Match(null); Assert.Null(actual.RemainingText()); }
private void PasswordTextKeyDown(object sender, KeyRoutedEventArgs e) { if (sender != null) { try { if (e.Key == Windows.System.VirtualKey.Enter) { if (string.IsNullOrEmpty(UsernameText.Text)) { UsernameText.Focus(FocusState.Programmatic); } else if (string.IsNullOrEmpty(PasswordText.Password)) { PasswordText.Focus(FocusState.Programmatic); } else { if (DataContext is LoginViewModel context) { if (context != null) { context.RunLogin(null); } } } } } catch { } } }
public void ForConstructorTrueAndTextTruexShouldReturnx() { var isTrue = new PasswordText("true"); IMatch actual = isTrue.Match("truex"); Assert.Equal("x", actual.RemainingText()); }
void ReleaseDesignerOutlets() { if (EmailText != null) { EmailText.Dispose(); EmailText = null; } if (LoginBtn != null) { LoginBtn.Dispose(); LoginBtn = null; } if (LoginUpperIamge != null) { LoginUpperIamge.Dispose(); LoginUpperIamge = null; } if (PasswordText != null) { PasswordText.Dispose(); PasswordText = null; } if (SignupBtn != null) { SignupBtn.Dispose(); SignupBtn = null; } }
public void ForConstructorTrueAndTextFalseShouldReturnTextfalse() { var isTrue = new PasswordText("true"); IMatch actual = isTrue.Match("false"); Assert.Equal("false", actual.RemainingText()); }
public void Clear() { IDText.Clear(); FullNameText.Clear(); UserNameText.Clear(); PasswordText.Clear(); }
public void ConstructorTrueAndTextTrueShouldReturnTrue() { var isTrue = new PasswordText("true"); IMatch actual = isTrue.Match("true"); Assert.True(actual.Succes()); }
public override void NavigatedToEvent(object sender, IDictionary <string, object> kwargs) { base.NavigatedToEvent(sender, kwargs); UserText.ClearContent(); UserName.ClearContent(); PasswordText.ClearContent(); }
void ReleaseDesignerOutlets() { if (LoginButton != null) { LoginButton.Dispose(); LoginButton = null; } if (PasswordText != null) { PasswordText.Dispose(); PasswordText = null; } if (SignUpButton != null) { SignUpButton.Dispose(); SignUpButton = null; } if (UsernameText != null) { UsernameText.Dispose(); UsernameText = null; } if (ViewDatabaseButton != null) { ViewDatabaseButton.Dispose(); ViewDatabaseButton = null; } }