Beispiel #1
0
        /// <summary>
        /// 点击菜单项:修改密码,弹出修改密码对话框
        /// </summary>
        /// <param name="isFirst"></param>
        private void ChangPassword(bool isFirst = false)
        {
            var changPw = new ChangPwModel();
            var view    = changPw.view;

            SubCloseEvent(view);
            view.Confirm.Click += (sender, args) =>
            {
                if (!changPw.Save())
                {
                    return;
                }

                CloseDialog(view);
            };

            changPw.Init(isFirst ? "123456" : null);
            view.ShowDialog();
        }
Beispiel #2
0
        /// <summary>
        /// 点击菜单项:修改密码,弹出修改密码对话框
        /// </summary>
        /// <param name="password">原密码</param>
        public void changPassword(string password)
        {
            var model = new ChangPwModel(password, "修改密码");

            model.callbackEvent += (sender, args) =>
            {
                if (!dataModel.changPassword(model.item))
                {
                    return;
                }

                Setting.tokenHelper.signature(model.item.password);
                Messages.showMessage("更换密码成功!请牢记新密码并使用新密码登录系统。");

                model.closeDialog();
            };

            model.showDialog();
        }