using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
//聊天用户类
public class ChatUser
{
private string _Name;//账号
private string _Password;//密码
private DateTime lastUpdated;//上次更新时间
public ChatUser(string name, string password)
{
this._Name = name;
this._Password = password;
this.lastUpdated = DateTime.Now;
}
public string Name//账号
{
get
{
return this._Name;
}
}
public string Password//密码
{
get
{
return this._Password;
}
}
public bool IsExpired(TimeSpan timeSpan)//用户登录是否过期
{
return DateTime.Now - this.lastUpdated >= timeSpan;
}
public void Update()//更新自己的过期时间
{
this.lastUpdated = DateTime.Now;
}
}
正文
.net_Ajax聊天室项目系列解读(User.cs)2008-10-31 17:27:00
【评论】 【打印】 【字体:大 中 小】 本文链接:http://blog.pfan.cn/yzrj/39178.html
阅读(1803) | 评论(0)
版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!
评论