/// <summary> /// 验证密码是否有效 /// </summary> /// <param name="admin"></param> /// <returns></returns> private bool CheckMaskIsValid(int leave = 0) { string s = Checksum.EncryptWithMD5(passwordEdit.Text); if (leave == 1) { return(s == Globals.MacData.AdminKey); } else if (leave == 2) { return(s == Globals.MacData.DevKey); } else { return(true); } }