⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msg.cs

📁 征服ASP.NET 2.0 Ajax 典型应用源码
💻 CS
字号:
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;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -