formpswmodify.cs

来自「个人理财系统 毕业论文 本软件是简单实用的公共软件。考虑到系统的构架简单」· CS 代码 · 共 62 行

CS
62
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Financial
{
    public partial class FormPswModify : Form
    {

        private string userName;
        private string oldPsw;
        internal string newPsw;

        private FormPswModify()
        {
            InitializeComponent();
        }


        public FormPswModify(string userName, string psw)
        {
            InitializeComponent();


            this.userName = userName;
            this.oldPsw = psw;
            this.label_User.Text += "       "+ this.userName;
        }

        private void button_Cancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }

        private void button_OK_Click(object sender, EventArgs e)
        {
            if (!this.textBox_OldPsw.Text.Equals(this.oldPsw))
            {
                this.label_Info.Text = "旧口令错误!";
                return;
            }
            else 
            {
                if (!this.textBox_NewPsw.Text.Equals(this.textBox_NewPsw2.Text))
                {
                    this.label_Info.Text = "两次输入的新口令不一致!";
                    return;
                }
                else
                {
                    this.DialogResult = DialogResult.OK;
                    this.newPsw = this.textBox_NewPsw2.Text;
                }
            }

        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?