/// <summary> /// 初始化 <see cref="QMFriendAddResponseEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="subType">事件子类型</param> /// <param name="robotQQ">机器人QQ</param> /// <param name="fromQQ">来源QQ</param> /// <param name="appendMessage">附加消息</param> public QMFriendAddResponseEventArgs(int type, int subType, long robotQQ, long fromQQ, IntPtr appendMessage) : base(type, robotQQ) { SubType = (QMFriendAddResponseEventSubTypes)subType; FromQQ = new QQ(fromQQ); AppendMessage = appendMessage.ToString(Global.DefaultEncoding); }
/// <summary> /// 初始化 <see cref="QMPrivateMessageEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="subType">事件子类型</param> /// <param name="robotQQ">机器人QQ</param> /// <param name="_"></param> /// <param name="fromQQ">来源QQ</param> /// <param name="msgNumber">消息序号</param> /// <param name="msgId">消息ID</param> /// <param name="message">详细信息</param> /// <exception cref="ArgumentOutOfRangeException">参数 robotQQ 或 fromQQ 小于 <see cref="QQ.MinValue"/></exception> /// <exception cref="ArgumentNullException">参数 message 为 <see langword="null"/></exception> public QMPrivateMessageEventArgs(int type, int subType, long robotQQ, long _, long fromQQ, long msgNumber, int msgId, IntPtr message) : base(type, robotQQ) { SubType = (QMPrivateMessageEventSubTypes)subType; FromQQ = new QQ(fromQQ); Message = new Message(msgId, msgNumber, message.ToString(Global.DefaultEncoding)); }
/// <summary> /// 初始化 <see cref="QMGroupAnonymousChangeEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="subType">事件子类型</param> /// <param name="robotQQ">机器人QQ</param> /// <param name="fromGroup">来源群组</param> /// <param name="fromQQ">来源QQ</param> public QMGroupAnonymousChangeEventArgs(int type, int subType, long robotQQ, long fromGroup, long fromQQ) : base(type, robotQQ) { SubType = (QMGroupAnonymousChangeEventSubTypes)subType; FromGroup = new Group(fromGroup); FromQQ = new QQ(fromQQ); }
/// <summary> /// 初始化 <see cref="QMGroupBanSpeakEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="subType">事件子类型</param> /// <param name="robotQQ">机器人QQ</param> /// <param name="fromGroup">来源群组</param> /// <param name="fromQQ">来源QQ</param> public QMGroupBanSpeakEventArgs(int type, int subType, long robotQQ, long fromGroup, long fromQQ) : base(type, robotQQ) { SubType = (QMGroupBanSpeakEventSubTypes)subType; FromGroup = new Group(fromGroup); FromQQ = new QQ(fromQQ); }
/// <summary> /// 初始化 <see cref="QMGroupMemberIncreaseEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="subType">事件子类型</param> /// <param name="robotQQ">机器人QQ</param> /// <param name="fromGroup">来源群组</param> /// <param name="fromQQ">来源QQ</param> /// <param name="operateQQ">操作QQ</param> public QMGroupMemberIncreaseEventArgs(int type, int subType, long robotQQ, long fromGroup, long fromQQ, long operateQQ) : base(type, robotQQ) { SubType = (QMGroupMemberIncreaseEventSubTypes)subType; FromGroup = new Group(fromGroup); FromQQ = new QQ(fromQQ); OperateQQ = new QQ(operateQQ); }
/// <summary> /// 初始化 <see cref="QMGroupMemberCardChangeEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="subType">事件子类型</param> /// <param name="robotQQ">机器人QQ</param> /// <param name="fromGroup">来源群组</param> /// <param name="fromQQ">来源QQ</param> /// <param name="newCard">新名片</param> public QMGroupMemberCardChangeEventArgs(int type, int subType, long robotQQ, long fromGroup, long fromQQ, IntPtr newCard) : base(type, robotQQ) { SubType = (QMGroupManagerChangeEventSubTypes)subType; FromGroup = new Group(fromGroup); FromQQ = new QQ(fromQQ); NewCard = newCard.ToString(Global.DefaultEncoding); }
/// <summary> /// 初始化 <see cref="QMGroupMemberDecreaseEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="subType">事件子类型</param> /// <param name="robotQQ">机器人QQ</param> /// <param name="fromGroup">来源群组</param> /// <param name="fromQQ">来源QQ</param> /// <param name="operateQQ">操作QQ</param> public QMGroupMemberDecreaseEventArgs(int type, int subType, long robotQQ, long fromGroup, long fromQQ, long operateQQ) : base(type, robotQQ) { SubType = (QMGroupMemberDecreaseEventSubTypes)subType; FromGroup = new Group(fromGroup); FromQQ = new QQ(fromQQ); if (this.SubType == QMGroupMemberDecreaseEventSubTypes.GroupManagerRemoveMember) { OperateQQ = new QQ(operateQQ); } }
/// <summary> /// 初始化 <see cref="QMGroupMemberBanSpeakEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="subType">事件子类型</param> /// <param name="robotQQ">机器人QQ</param> /// <param name="fromGroup">来源群组</param> /// <param name="fromQQ">来源QQ</param> /// <param name="operateQQ">操作QQ</param> /// <param name="banTime">禁言时长</param> public QMGroupMemberBanSpeakEventArgs(int type, int subType, long robotQQ, long fromGroup, long fromQQ, long operateQQ, int banTime) : base(type, robotQQ) { SubType = (QMGroupMemberBanSpeakEventSubTypes)subType; FromGroup = new Group(fromGroup); FromQQ = new QQ(fromQQ); OperateQQ = new QQ(operateQQ); if (this.SubType == QMGroupMemberBanSpeakEventSubTypes.GroupMemberSetBanSpeak) { BanSpeakTimeSpan = new TimeSpan? (new TimeSpan(banTime * 10000000L)); } }
/// <summary> /// 初始化 <see cref="QMGroupAddRequestEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="subType">事件子类型</param> /// <param name="robotQQ">机器人QQ</param> /// <param name="fromGroup">来源群组</param> /// <param name="fromQQ">来源QQ</param> /// <param name="operateQQ">操作QQ</param> /// <param name="responseFlag">反馈标识</param> public QMGroupAddRequestEventArgs(int type, int subType, long robotQQ, long fromGroup, long fromQQ, long operateQQ, IntPtr responseFlag) : base(type, robotQQ) { SubType = (QMGroupAddRequestEventSubTypes)subType; FromGroup = new Group(fromGroup); FromQQ = new QQ(fromQQ); if (this.SubType == QMGroupAddRequestEventSubTypes.InviteMyAddGroup) { OperateQQ = new QQ(operateQQ); } Request = new Request(responseFlag.ToString(Global.DefaultEncoding)); }
/// <summary> /// 初始化 <see cref="QMGroupMemberRemoveMessageEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="subType">事件子类型</param> /// <param name="robotQQ">机器人QQ</param> /// <param name="fromGroup">来源群组</param> /// <param name="fromQQ">来源QQ</param> /// <param name="msgNumber">消息序号</param> /// <param name="msgId">消息标识 (ID)</param> /// <exception cref="ArgumentOutOfRangeException">参数 msgNumber 或 msgId 小于 0</exception> public QMGroupMemberRemoveMessageEventArgs(int type, int subType, long robotQQ, long fromGroup, long fromQQ, long msgNumber, int msgId) : base(type, robotQQ) { if (msgId < 0) { throw new ArgumentOutOfRangeException(nameof(msgId)); } if (msgNumber < 0) { throw new ArgumentOutOfRangeException(nameof(msgNumber)); } SubType = (QMGroupMemberRemoveMessageEventSubTypes)subType; FromGroup = new Group(fromGroup); FromQQ = new QQ(fromQQ); MessageNumber = msgNumber; MessageId = msgId; }
/// <summary> /// 初始化 <see cref="QMEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="robotQQ">接收当前事件的机器人QQ</param> /// <exception cref="ArgumentOutOfRangeException">参数 robotQQ 小于 <see cref="QQ.MinValue"/></exception> public QMEventArgs(int type, long robotQQ) { this.Type = (QMEventTypes)type; this.RobotQQ = new QQ(robotQQ); }
/// <summary> /// 初始化 <see cref="QMBeFriendDeleteEventArgs"/> 类的新实例 /// </summary> /// <param name="type">事件类型</param> /// <param name="subType">事件子类型</param> /// <param name="robotQQ">机器人QQ</param> /// <param name="fromQQ">来源QQ</param> /// <param name="appendMessage">附加消息</param> public QMBeFriendDeleteEventArgs(int type, int subType, long robotQQ, long fromQQ, IntPtr appendMessage) : base(type, robotQQ) { SubType = (QMBeFriendDeleteEventSubTypes)subType; FromQQ = new QQ(fromQQ); }