示例#1
0
        private void TxtPas_IconClick(object sender, EventArgs e)
        {
            TxtPas.IsSystemPasswordChar = true;
            var xx = new CCWin.SkinControl.SkinWaterTextBox();

            xx.UseSystemPasswordChar = true;
            xx.PasswordChar          = '*';
            xx.TextChanged          += delegate(object senderx, EventArgs ex) { TxtPas.Text = xx.Text; };//new EventHandler(textBox2_TextChanged) ;}
            PassKey pass = new PassKey(this.Left + TxtPas.Left - 25, this.Top + TxtPas.Bottom, xx);

            pass.Show();
        }
示例#2
0
文件: frmLogin.cs 项目: cang2016/RMS
        private void textBoxPwd_IconClick(object sender, EventArgs e)
        {
            PassKey pass = new PassKey(this.Left + this.textBoxPwd.Left - 25, this.Top + this.textBoxPwd.Bottom, this.textBoxPwd.SkinTxt);

            pass.Show(this);
        }
示例#3
0
        private void txtPwd_IconClick(object sender, EventArgs e)
        {
            PassKey pass = new PassKey(this.Left + txtPwd.Left - 25, this.Top + txtPwd.Bottom, txtPwd);

            pass.Show();
        }
示例#4
0
        private void password_IconClick(object sender, EventArgs e) //软键盘
        {
            PassKey pass = new PassKey(this.Left + password.Left - 25, this.Top + password.Bottom, password.SkinTxt);

            pass.Show(this);
        }
示例#5
0
文件: FrmLogin.cs 项目: sllt/eTalk
 private void btnKeyBoard_Click(object sender, EventArgs e)
 {
     PassKey pk = new PassKey(this.Left + btnKeyBoard.Left - 110, this.Top + btnKeyBoard.Bottom+50 + pnlBase.Top, txtPwd);
     pk.Show(this);
 }
示例#6
0
        private void btnJpPwd_Click(object sender, EventArgs e)
        {
            PassKey pass = new PassKey(this.Left + tbox_password.Left - 25, this.Top + tbox_password.Bottom + 1, tbox_password.SkinTxt);

            pass.Show(this);
        }
示例#7
0
        private void BtnJpPwd_Click(object sender, EventArgs e)
        {
            PassKey pass = new PassKey(this.Left + TextPwd.Left - 25, this.Top + TextPwd.Bottom + 1, TextPwd.SkinTxt);

            pass.Show(this);
        }
示例#8
0
        void InitEvents()
        {
            stbPassword.IconClick += delegate
            {
                PassKey passKey = new PassKey(
                    Left + stbPassword.Left,
                    Top + stbPassword.Bottom,
                    stbPassword.SkinTxt);
                passKey.Show(this);
            };

            checkBoxRememberPwd.CheckedChanged += (sender, e) =>
            {
                if (!checkBoxRememberPwd.Checked)
                {
                    checkBoxAutoLogin.Checked = false;
                }
            };

            checkBoxAutoLogin.CheckedChanged += (sender, e) =>
            {
                if (checkBoxAutoLogin.Checked)
                {
                    checkBoxRememberPwd.Checked = true;
                }
            };

            EventHandler btnMouseEnter = (sender, e) =>
            {
                var control = sender as Control;
                control.ForeColor = Color.FromArgb(98, 180, 247);
            };

            EventHandler btnMouseLeave = (sender, e) =>
            {
                var control = sender as Control;
                control.ForeColor = Color.FromArgb(39, 134, 228);
            };

            EventHandler tbFocus = (sender, e) =>
            {
                var control = sender as Control;
                errorProvider.SetError(control.Parent, string.Empty);
            };

            btnRegister.MouseEnter       += btnMouseEnter;
            btnForgotPassword.MouseEnter += btnMouseEnter;
            btnRegister.MouseLeave       += btnMouseLeave;
            btnForgotPassword.MouseLeave += btnMouseLeave;

            stbAccount.SkinTxt.GotFocus  += tbFocus;
            stbPassword.SkinTxt.GotFocus += tbFocus;

            btnLogin.Click    += btnLogin_Click;
            btnRegister.Click += (sender, e) =>
            {
                var view = _viewFactory.GetView <ViewRegister>();
                view.ShowDialog(this);
            };
            btnForgotPassword.Click += (sender, e) =>
            {
                MessageBoxEx.Show(this, "请联系管理员!", "忘记密码",
                                  MessageBoxButtons.OK, MessageBoxIcon.Information);
            };
        }