chatargs.cs

来自「Gibphone is CSharp Program, it can tell 」· CS 代码 · 共 42 行

CS
42
字号
using System;
using System.Collections.Generic;
using System.Text;

namespace GPCore.Args
{
    /// <summary>
    /// An EventArgs class that extends from <see cref="MessageArgs"/> and adds the value chatID.
    /// </summary>
    public class ChatArgs : MessageArgs
    {
        private int chatid;
        /// <summary>
        /// A unique identifier for this chat.
        /// </summary>
        public int ChatID
        {
            get { return chatid; }
        }

        /// <summary>
        /// Creates a new ChatArgs with no MessageParams
        /// </summary>
        /// <param name="chatID">The unique ID of this chat.</param>
        /// <param name="message">The message</param>
        /// <param name="sender">The Username of the sender</param>
        public ChatArgs(int chatID, string message, string sender) : this(chatID, message, sender, MessageParams.None) { }
        /// <summary>
        /// Creates a new ChatArgs
        /// </summary>
        /// <param name="chatID">The unique ID of this chat.</param>
        /// <param name="message">The message</param>
        /// <param name="sender">The Username of the sender, or in the case of a call back, the username of the person the message was intended for</param>
        /// <param name="messageparams">The <see cref="MessageParams"/> describing the Message</param>
        public ChatArgs(int chatID, string message, string sender, MessageParams messageparams)
            : base(message, sender, messageparams)
        {
            this.chatid  = chatID;
        }
    }
}

⌨️ 快捷键说明

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