记住我复选框 [英] Remember me check box

查看:86
本文介绍了记住我复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我在Windows中创建了一个登录表单,其中确实有一个用户名文本框,一个密码文本框和一个复选框.我希望每当用户单击复选框(checked == true)时,都不应向用户询问用户名.在用户名文本框中,必须看到最后一个登录用户.

Hi all,
I have created a login form in windows.In that i do have a username textbox, a password textbox and a checkbox. I want that whenever user clicks checkbox(checked==true) it should not ask username to the user. In username textbox last login user must be seen.

推荐答案

您必须编写代码才能做到这一点.您可以选择将凭据存储在数据库中(如果您的应用程序有一个凭据),也可以存储在XML文件或文本文件中.

请确保使用强大的加密方案对密码进行加密.
You have to write code to do that. You can choose to store the credentials in the database (if your app has one), or in an XML file or a text file.

Be sure to encrypt the password using a strong encryption scheme.


如果使用Winform应用程序.您可以将用户标识和密码存储在用户的MyDocumentsFolder中的txtfile中. (System.Environment.SpecialFolder.MyDocument)
您可以使用Userid,Password或要从该用户保存的任何其他设置创建一个简单的类,然后将其序列化到该文件.
登录期间,如果该文件存在,则将其反序列化并验证身份验证
If its Winform Applcation . You can store the userid and password in txtfile in MyDocumentsFolder of the user. (System.Environment.SpecialFolder.MyDocument)
You can create a simple class with Userid,Password, or any more settings that you want to save from that user and then can serialize it to that file.
During login if that file exist you deserialize it and verify the authentication


这篇关于记住我复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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