private void DetectInputLogin() { string Name = Account.Text.Trim(); string Passwd = Password.Password; string PasswdV = PasswordV.Password; string Email = EmailInput.Text.Trim(); if (string.IsNullOrEmpty(Name) || string.IsNullOrEmpty(Passwd) || string.IsNullOrEmpty(PasswdV) || string.IsNullOrEmpty(Email)) { if (string.IsNullOrEmpty(Name)) { Account.Focus(FocusState.Keyboard); } else if (string.IsNullOrEmpty(Passwd)) { Password.Focus(FocusState.Keyboard); } else if (string.IsNullOrEmpty(PasswdV)) { PasswordV.Focus(FocusState.Keyboard); } else if (string.IsNullOrEmpty(Email)) { EmailInput.Focus(FocusState.Keyboard); } } else if (Passwd != PasswdV) { StringResources stx = StringResources.Load("Error"); ServerMessage.Text = stx.Str("PasswordMismatch"); Password.Focus(FocusState.Keyboard); } else { ServerMessage.Text = ""; IsPrimaryButtonEnabled = IsSecondaryButtonEnabled = Account.IsEnabled = Password.IsEnabled = PasswordV.IsEnabled = EmailInput.IsEnabled = false ; this.Focus(FocusState.Pointer); IndicateLoad(); RuntimeCache RCache = new RuntimeCache() { EN_UI_Thead = true }; RCache.POST( Shared.ShRequest.Server , Shared.ShRequest.Register(Name, Passwd, Email) , RequestComplete, RequestFailed, false); } }
private void DetectInputLogin() { string CurrPasswd = CurrentPassword.Password; string NewPasswd = Password.Password; string PasswdV = PasswordV.Password; if (string.IsNullOrEmpty(CurrPasswd) || string.IsNullOrEmpty(NewPasswd) || string.IsNullOrEmpty(PasswdV)) { if (string.IsNullOrEmpty(CurrPasswd)) { CurrentPassword.Focus(FocusState.Keyboard); } else if (string.IsNullOrEmpty(NewPasswd)) { Password.Focus(FocusState.Keyboard); } else if (string.IsNullOrEmpty(PasswdV)) { PasswordV.Focus(FocusState.Keyboard); } } else if (NewPasswd != PasswdV) { StringResources stx = StringResources.Load("Error"); ServerMessage.Text = stx.Str("PasswordMismatch"); Password.Focus(FocusState.Keyboard); } else { ServerMessage.Text = ""; IsPrimaryButtonEnabled = IsSecondaryButtonEnabled = CurrentPassword.IsEnabled = Password.IsEnabled = PasswordV.IsEnabled = false ; this.Focus(FocusState.Pointer); IndicateLoad(); RuntimeCache RCache = new RuntimeCache() { EN_UI_Thead = true }; RCache.POST( Shared.ShRequest.Server , Shared.ShRequest.ChangePassword(CurrPasswd, NewPasswd) , RequestComplete, RequestFailed, false); } }