public void ShowUser(UserVO user, UserFormMode mode) { if (!CheckAccess()) { Dispatcher.BeginInvoke(new ShowUserDelegate(ShowUser), new object[] { user, mode }); return; } m_mode = mode; if (user == null) { ClearForm(); } else { m_user = user; formGrid.DataContext = user; firstName.Text = user.FirstName; lastName.Text = user.LastName; email.Text = user.Email; userName.Text = user.UserName; password.Password = confirmPassword.Password = user != null ? user.Password : ""; department.SelectedItem = user.Department; firstName.Focus(); UpdateButtons(); } }
public void ShowUser(UserVO user, UserFormMode mode) { m_mode = mode; if (user == null) { ClearForm(); } else { m_user = user; txt_firstName.text = user.FirstName; txt_lastName.text = user.LastName; txt_email.text = user.Email; txt_userName.text = user.UserName; txt_password.text = txt_confirmPassword.text = user != null ? user.Password : ""; txt_department.text = user.Department; //txt_firstName.ActivateInputField(); EventSystem.current.SetSelectedGameObject(txt_firstName.gameObject); //txt_firstName.MoveTextEnd(false); txt_firstName.caretPosition = txt_firstName.text.Length - 1; UpdateButtons(); } }
/// <summary> /// 显示当前用户信息 /// </summary> /// <param name="user"></param> /// <param name="mode"></param> public void ShowUser(UserVO user, UserFormMode mode) { m_mode = mode; if (user == null) { ClearForm(); } else { InteractiveInput(true); m_user = user; txtUserName.text = user.UserName; inputFirstName.text = user.FirstName; inputLastName.text = user.LastName; inputEmail.text = user.Email; inputUserName.text = user.UserName; inputPassword.text = inputConfirmPassword.text = user != null ? user.Password : ""; dropdownDepartment.value = user.Department.Ordinal + 1; EventSystem.current.SetSelectedGameObject(inputFirstName.gameObject); inputFirstName.caretPosition = inputFirstName.text.Length - 1; UpdateButtons(); } }
public void ShowUser(UserVO user, UserFormMode mode) { if (!CheckAccess()) { Dispatcher.BeginInvoke(new ShowUserDelegate(ShowUser), new object[] { user, mode }); return; } m_mode = mode; if (user == null) { ClearForm(); } else { m_user = user; formGrid.DataContext = user; firstName.Text = user.FirstName; lastName.Text = user.LastName; email.Text = user.Email; userName.Text = user.UserName; password.Password = confirmPassword.Password = user != null ? user.Password : ""; department.SelectedItem = user.Department; firstName.Focus(); UpdateButtons(); } }