public void ChangePinPageControl(object sender, KeyEventArgs e) { if ((Digit1.PinFieldValidator(Digit2, Digit3, Digit4) != 1) || (Handle == 0)) { Digit1.TextBoxControl(Digit2, Digit3, Digit4, e); if (e.Key == Key.F9) { if (Digit1.PinFieldValidator(Digit2, Digit3, Digit4) == 1) { Handle = 1; return; } else { StateInfo.Content = "Enter All Four Digits"; } } } else { Digit1Conf.Focus(); Digit1Conf.TextBoxControl(Digit2Conf, Digit3Conf, Digit4Conf, e); if (e.Key == Key.F9) { if ((Digit1Conf.PinFieldValidator(Digit2Conf, Digit3Conf, Digit4Conf) == 1) && (Digit1.ConfirmPinValidator(Digit2, Digit3, Digit4, Digit1Conf, Digit2Conf, Digit3Conf, Digit4Conf) == 1)) { Confirm.PerformClick(); } else if ((Digit1Conf.PinFieldValidator(Digit2Conf, Digit3Conf, Digit4Conf) == 1)) { StateInfo.Content = "PINS DON'T Match"; } else { StateInfo.Content = "Enter all four Digits"; } } if ((e.Key == Key.Back) && (Digit1Conf.IsFocused) && (Digit1Conf.Text.Length == 0)) { Handle = 0; ChangePinPageControl(sender, e); } } }
public void PinPageControl(object sender, KeyEventArgs e) { Digit1.TextBoxControl(Digit2, Digit3, Digit4, e); if (e.Key == Key.F9) { if ((Digit1.PinFieldValidator(Digit2, Digit3, Digit4) == 1)) { Enter.PerformClick(); } else { StateInfo.Content = "Enter All Four Digits Of Your Pin"; } } else if (e.Key == Key.F8) { Cancel.PerformClick(); } }