using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace ryControls.TreeXML { /// /// /// public partial class FrmChangePwd : Form { /// /// /// public FrmChangePwd() { InitializeComponent(); } /// ///旧密码 /// public string oldPwd = ""; /// /// 新密码 /// public string NewPwd = ""; private void BtnOK_Click(object sender, EventArgs e) { if (txtOldPwd.Text != oldPwd) { MessageBox.Show("您输入的旧密码不正确!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (txtNewPwd.Text != txtRePwd.Text) { MessageBox.Show("您两次输入的新密码不一致!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } NewPwd = txtNewPwd.Text; this.DialogResult = DialogResult.OK; } } }