Windows形式的会话 [英] Session in Windows Form
本文介绍了Windows形式的会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我正在构建一个桌面应用程序.我已经完成了登录表单.
首先,我登录到用户,然后退出,然后关闭应用程序.再次单击应用程序文件.exe,再次要求输入用户名和密码.
是否有任何类似会话的事情来存储令牌id.所以我可以很容易地知道用户是否已注销或不喜欢在Web应用程序中.
请提出如何解决这个问题的建议.
在此先谢谢您.
Hi all
I am building a desktop application.I have made a log in form.
First i login to a user and than without log out i close the application.Again i clicked on the application file .exe it is again asking to enter the username and password.
Is there any session like thing is there to store the token id.So that i can easily know the user is logged out or not like in web application.
Please suggest how i will solve this problem.
Thanks in advance.
推荐答案
否Windows窗体中没有会话支持.通过将信息存储在数据库/文件中,Yuu可以建立自己的支持.
不是傻瓜,但可以.
No there is no session support in Windows forms. Yuu can build your own support though by storing information in a database / file.
Not fool proof but could work.
不.会话是一个网络概念.
最简单的方法是处理主窗体的Closing事件,然后注销.
No. Session is a web concept.
The easiest way to do this would be to handle the main form Closing event, and log off then.
这篇关于Windows形式的会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文