/// <summary> /// 登陆窗体 /// </summary> /// <returns></returns> private bool UserLogin() { frmLogin frmLogin = new frmLogin(); try { DialogResult result = frmLogin.ShowDialog(this); if (result == DialogResult.OK) { return true; } else { return false; } } finally { frmLogin.Dispose(); } }