使用 Office 2007 扩展(即 docx)作为基于皮肤的屏幕键盘

发布于 2024-08-29 07:50:21 字数 186 浏览 3 评论 0原文

我正在为我的应用程序创建一个屏幕键盘,它也支持皮肤。 这是我对皮肤所做的事情,我有一个文件夹,其中包含一些图像和一个将图像映射到键盘的 xml 文件,我希望能够将该文件夹作为 zip 文件,就像 Office 2007 中的那样 (.docx )和iPhone固件(.ipsw),我知道我可以简单地压缩文件夹并更改扩展名,我需要知道的是如何读取代码中的文件。

I'm creating a On-Screen keyboard for my application, and it supports skins as well.
Here's what I'm doing with the skins, I have a folder which contains some images and a xml file which maps the images to the keyboard, I want to be able to have the folder as a zip file like in Office 2007 (.docx) and iPhone firmwares (.ipsw), I know I can simply zip the folder and change the extension, what I need to know is how to read the files in the code.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

把时间冻结 2024-09-05 07:50:21

您有两个选择,要么 1) 仅使用 zip 库,例如 SharpZipLib 或 < a href="http://dotnetzip.codeplex.com/" rel="nofollow noreferrer">DotNetZip 或 2) 尝试使用 System.IO.Packaging 命名空间。我认为选项 1 可能是最简单的。

Office 和其他程序所做的事情并没有什么神奇之处,它们只是读取 zip 文件并根据需要从中提取内容。您只需从 MemoryStream 中提取图像,而不是从磁盘中提取图像。

You've got two options, either 1) just use a zip library like SharpZipLib or DotNetZip or 2) try to use the System.IO.Packaging namespace. I think option 1 would be the easiest probably.

There's nothing really magical that Office and other programs are doing, they're just reading a zip file and pulling stuff out of it as needed. Instead of pulling an image from a disk you just pull it from a MemoryStream.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文