XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension

【DLL】XFE各类拓展是一个C#的DLL库,旨在优化C#代码中常用语句的使用,并提供更简洁的访问方式,同时提供Xunit测试框架,快速搭建服务器/客户端,免费ChatGPTAPI接口,免费通讯服务器,XFE下载器,新增格式等

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFEExtension

准备使用XFEMessage.xfe统一读取路径

ea49376
XFE工作室室长 <xfe18827675401@126.com>
提交于

代码差异

1 个文件 +16 -17
Modified XFE各类拓展/CyberComm.cs +16 -17
@@ -1559,7 +1559,7 @@ namespace XFE各类拓展.CyberComm
1559 1559 switch (Path.GetExtension(filePath))
1560 1560 {
1561 1561 case ".png":
1562 xCCFileDictionary.Add(messageId, new XCCFile(groupId, messageId, XCCFileType.Image, fileBuffer));
1562 xCCFileDictionary.Add(messageId, new XCCFile(groupId, messageId, XCCFileType.Image,, fileBuffer));
1563 1563 break;
1564 1564 case ".mp4":
1565 1565 xCCFileDictionary.Add(messageId, new XCCFile(groupId, messageId, XCCFileType.Video, fileBuffer));
@@ -1694,6 +1694,14 @@ namespace XFE各类拓展.CyberComm
1694 1694 /// </summary>
1695 1695 public string MessageId { get; }
1696 1696 /// <summary>
1697 /// 发送者
1698 /// </summary>
1699 public string Sender { get; }
1700 /// <summary>
1701 /// 发送时间
1702 /// </summary>
1703 public DateTime SendTime { get; }
1704 /// <summary>
1697 1705 /// XCC文件类型
1698 1706 /// </summary>
1699 1707 public XCCFileType FileType { get; }
@@ -1721,27 +1729,18 @@ namespace XFE各类拓展.CyberComm
1721 1729 /// <param name="groupId">群组ID</param>
1722 1730 /// <param name="messageId">文件消息ID</param>
1723 1731 /// <param name="fileType">文件类型</param>
1732 /// <param name="sender">发送者</param>
1733 /// <param name="sendTime">发送时间</param>
1724 1734 /// <param name="fileBuffer">文件的Buffer</param>
1725 public XCCFile(string groupId, string messageId, XCCFileType fileType, byte[] fileBuffer)
1735 public XCCFile(string groupId, string messageId, XCCFileType fileType, string sender, DateTime sendTime, byte[] fileBuffer = null)
1726 1736 {
1727 1737 GroupId = groupId;
1728 FileType = fileType;
1729 1738 MessageId = messageId;
1730 FileBuffer = fileBuffer;
1731 Loaded = true;
1732 }
1733 /// <summary>
1734 /// XCC文件
1735 /// </summary>
1736 /// <param name="groupId">群组ID</param>
1737 /// <param name="messageId">文件ID</param>
1738 /// <param name="fileType">文件类型</param>
1739 public XCCFile(string groupId, string messageId, XCCFileType fileType)
1740 {
1741 GroupId = groupId;
1742 1739 FileType = fileType;
1743 MessageId = messageId;
1744 Loaded = false;
1740 Sender = sender;
1741 SendTime = sendTime;
1742 FileBuffer = fileBuffer;
1743 Loaded = fileBuffer != null;
1745 1744 }
1746 1745 }
1747 1746 /// <summary>