Пример #1
0
        private void butPassword_Click(object sender, EventArgs e)
        {
            bool isCreate = false;

            if (string.IsNullOrEmpty(UserCur.PasswordHash))
            {
                isCreate = true;
            }
            FormCentralUserPasswordEdit FormCPE = new FormCentralUserPasswordEdit(isCreate, UserCur.UserName);

            FormCPE.IsInSecurityWindow = true;
            FormCPE.ShowDialog();
            if (FormCPE.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            UserCur.LoginDetails = FormCPE.LoginDetails;
            if (UserCur.PasswordHash == "")
            {
                butPassword.Text = "Create Password";
            }
            else
            {
                butPassword.Text = "Change Password";
            }
        }
Пример #2
0
        private void menuItemPassword_Click(object sender, EventArgs e)
        {
            FormCentralUserPasswordEdit FormCPE = new FormCentralUserPasswordEdit(false, Security.CurUser.UserName);

            if (FormCPE.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            Security.CurUser.Password = FormCPE.HashedResult;
            Userods.Update(Security.CurUser);
        }
Пример #3
0
		private void butPassword_Click(object sender,EventArgs e) {
			bool isCreate=false;
			if(_userCur.Password==null) {
				isCreate=true;
			}
			FormCentralUserPasswordEdit FormCPE=new FormCentralUserPasswordEdit(isCreate,_userCur.UserName);
			FormCPE.ShowDialog();
			if(FormCPE.DialogResult==DialogResult.Cancel){
				return;
			}
			_userCur.Password=FormCPE.HashedResult;
			if(_userCur.Password==""){
				butPassword.Text="Create Password";
			}
			else{
				butPassword.Text="Change Password";
			}
		}