using DevExpress.XtraEditors; using System; using System.Windows.Forms; namespace ZJ_BYD { public partial class ConfirmPwd : XtraForm { public string inputPwd = ""; public ConfirmPwd() { InitializeComponent(); if (string.IsNullOrWhiteSpace(Program.MenuPwd)) { Program.MenuPwd = "123456"; this.txtPwd.Text = Program.MenuPwd; } } private void btnOk_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(this.txtPwd.Text)) { XtraMessageBox.Show("口令不能为空!", "系统提示"); return; } inputPwd = txtPwd.Text; this.DialogResult = DialogResult.Cancel; } private void btnCancel_Click(object sender, EventArgs e) { this.Close(); } } }