private static int EventGroupUpload(int subType, int sendTime, long fromGroup, long fromQQ, string file) { CqGroupFileUploadEventArgs args = new CqGroupFileUploadEventArgs(); args.SendTime = NativeConvert.FotmatUnixTime(sendTime.ToString()); args.FromGroup = fromGroup; args.FromQQ = fromQQ; args.File = Common.CqApi.GetFile(file); ReceiveFileUploadMessage(null, args); return((int)(args.Handler ? MessageHanding.Intercept : MessageHanding.Ignored)); //如果处理过就截断消息 }
private static int Evnet__eventGroupUpload(int subType, int sendTime, long fromGroup, long fromQQ, string file) { CqGroupFileUploadEventArgs args = new CqGroupFileUploadEventArgs(4, sendTime.ToDateTime(), fromGroup, fromQQ, Common.CqApi.GetFile(file)); if (subType == 1) { if (ReceiveFileUploadMessage_4 != null) { ReceiveFileUploadMessage_4(null, args); } } return(Convert.ToInt32(args.Handler)); }
/// <summary> /// Type=11 群文件上传事件<para/> /// 处理收到的群文件上传结果 /// </summary> /// <param name="sender">事件的触发对象</param> /// <param name="e">事件的附加参数</param> public void ReceiveGroupFileUpload(object sender, CqGroupFileUploadEventArgs e) { // 本子程序会在酷Q【线程】中被调用,请注意使用对象等需要初始化(CoInitialize,CoUninitialize)。 // 这里处理消息 // 关于文件信息, 触发事件时已经转换完毕, 请直接使用 e.Handler = LuaEnv.LuaEnv.RunLua( "", "envent/ReceiveGroupFileUpload.lua", new ArrayList() { "fromqq", e.FromQQ, "fromgroup", e.FromGroup, "fileName", e.File.Name, "id", e.File.Id, "size", e.File.Size, }); //e.Handled = false; // 关于返回说明, 请参见 "Event_FriendMessage.ReceiveFriendMessage" 方法 }