如何实现像会话超时特别会议的WinForm [英] how to implement winform session like session timeout especially

查看:259
本文介绍了如何实现像会话超时特别会议的WinForm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我计划,实施类似窗口的​​应用程序会话的功能,但不为宗旨,以保持在第一。主要目的使用信息注销或会话expires.I后登录/密码至少可以提示找不到有关的信息就可以了超时功能online.I将非常gratefull如果有人能指出我的一些ressources或分享他的经验us.Thanks阅读这篇
PS:我使用C#.NET 2.0与Visual Studio 2005 MERCI。

Hi i've plan to implement a feature like session in window application but not for the purpose to hold use information at first.the main purpose is to log out or at least prompt for login/password after session expires.I can't find information regarding to timeout feature on it online.I would be very gratefull if someone can point me to some ressources or share his experience with us.Thanks for reading this PS: i'm using C#.NET 2.0 with visual studio 2005 merci .

推荐答案

您简单的解决办法是使用定时并设置持续时间属性的毫秒数你想在你的超时时间。每当你遇到的活动,你可以通过调用停止然后立即调用开始复位定时器。你会在定时勾选事件喜欢的任何代码(假设的地方,这是一个 System.Windows.Forms.Timer ),你将所有设置。

Your simplest solution would be to use a Timer and set the Duration property to the number of milliseconds you'd like in your timeout. Whenever you encounter activity, you can just reset the timer by calling Stop then immediately calling Start. Place whatever code you'd like in the Timer's Tick event (assuming this is a System.Windows.Forms.Timer) and you'll be all set.

这篇关于如何实现像会话超时特别会议的WinForm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆