正文

.net_Ajax聊天室项目系列解读(msg.cs)2008-10-31 17:27:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/yzrj/39179.html

分享到:

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
//聊天消息类
public class Msg
{
    private string _UserName = "系统";//消息发送者
    private string _OtherName = "所有人";//消息接收者
    private string _Message;//消息
    private DateTime _DateTime;//发送时间
    private string _Img = "";//表情图片
    private string _IsBold = "0";//是否黑体(斜体)
    private string _Color = null;//消息的颜色
   
    public DateTime DateTime//消息发送时间
    {
        get
        {
            return this._DateTime;
        }
    }
    public string UserName//消息发送者
    {
        get
        {
            return this._UserName;
        }
    }
    public string Message//消息
    {
        get
        {
            return this._Message;
        }
    }
    public string OtherName//消息接收者
    {
        get { return _OtherName; }
    }
    public string IsBold//是否黑体(斜体)1代表黑体 2代表斜体
    {
        get { return _IsBold; }
    }
    public string Color//消息的颜色
    {
        get { return _Color; }

    }
    public string Img//消息附加的表情图片
    {
        get { return _Img; }
    }
    //聊天消息初始化函数
    public Msg(string userName, string othername, string message, string isbold, string color, string img)
    {
        this._UserName = userName;
        this._OtherName = othername;
        this._Message = message;
        this._IsBold = isbold;
        this._Color = color;
        this._Img = img;
        this._DateTime = DateTime.Now;
    }
    public Msg(string msg)//系统消息初始化函数
    {
        this._Message = msg;
        this._DateTime = DateTime.Now;
    }
}

阅读(1737) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册