private void 退出EToolStripMenuItem1_Click(object sender, EventArgs e) { if (server.ExitPassWord == "") { CloseServer(); } else { frm_PassWord passwordForm = new frm_PassWord(); DialogResult result = passwordForm.ShowDialog(); if (result == DialogResult.OK) { if (server.ExitPassWord == PassWord.MD5Encrypt(passwordForm.Password)) { if (!System.IO.File.Exists(Constant.PassWordFilename)) { PassWord.Save(Constant.PassWordFilename, server.ExitPassWord); } CloseServer(); } else { MessageBox.Show("密码错误!", "密码错误", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } } }
private void �˳�EToolStripMenuItem1_Click(object sender, EventArgs e) { if (server.ExitPassWord == "") CloseServer(); else { frm_PassWord passwordForm = new frm_PassWord(); DialogResult result = passwordForm.ShowDialog(); if (result == DialogResult.OK) { if (server.ExitPassWord == PassWord.MD5Encrypt(passwordForm.Password)) { if (!System.IO.File.Exists(Constant.PassWordFilename)) PassWord.Save(Constant.PassWordFilename, server.ExitPassWord); CloseServer(); } else MessageBox.Show("�������!", "�������", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } }