文件名称:ManOriKnowledge
-
所属分类:
- 标签属性:
- 上传时间:2008-10-13
-
文件大小:38.49kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
最近弄一个可以编辑显示文本、图片、公式、表格、超链接等内容的东东,将其保存好数据库(DB4O),然后直接在内存中打开。最先想到的当然是dotNet的RichTextBox,但它对这些格式数据支持并不好,尤其是上下标。然后就是微软的Office Framer Control,没有什么问题,但是需要运行word进程,那玩意太庞大,尤其是在打开多个文档的时候占用内存过多。最后想到了wpf的Flowdocment,它虽然不直接支持公式,但在能直接将相关内容转换为图片形式,且不会改变显示样式。使用WPF的richTextBox可以直接将word编辑好的内容复制过来,然后保存。
同时文档保存形式也就讲究,应该保存为XamlPackage,这是一种压缩格式,把流文档的各种相关数据一同保存,因此很省事,不用关系连接或图片、多媒体的数据源问题。当然XamlPackage只保存Section节点。
在数据库中文档用byte[]表示,从数据库中打开文档时,可以使用byte[]实例化MemoryStream然后直接加载到相应的流文档显示控件中,但保存到数据库时却需要使用临时文件转储。相应的代码如下(C#):
同时文档保存形式也就讲究,应该保存为XamlPackage,这是一种压缩格式,把流文档的各种相关数据一同保存,因此很省事,不用关系连接或图片、多媒体的数据源问题。当然XamlPackage只保存Section节点。
在数据库中文档用byte[]表示,从数据库中打开文档时,可以使用byte[]实例化MemoryStream然后直接加载到相应的流文档显示控件中,但保存到数据库时却需要使用临时文件转储。相应的代码如下(C#):
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ManOriKnowledge/App.xaml
ManOriKnowledge/App.xaml.cs
ManOriKnowledge/chocolate.xaml
ManOriKnowledge/Db4oClientConfiger.cs
ManOriKnowledge/Icon/charactergrowfont.png
ManOriKnowledge/Icon/charactershrinkfont.png
ManOriKnowledge/Icon/editcopy.png
ManOriKnowledge/Icon/editcu.png
ManOriKnowledge/Icon/editpaste.png
ManOriKnowledge/Icon/editredo.png
ManOriKnowledge/Icon/editundo.png
ManOriKnowledge/Icon/fileNew.png
ManOriKnowledge/Icon/fileopen.png
ManOriKnowledge/Icon/filesave.png
ManOriKnowledge/Icon/fileSaveas.png
ManOriKnowledge/Icon/listbullets.png
ManOriKnowledge/Icon/listnumbering.png
ManOriKnowledge/Icon/paragraphcenterjustify.png
ManOriKnowledge/Icon/paragraphdecreaseindentation.png
ManOriKnowledge/Icon/paragraphfulljustify.png
ManOriKnowledge/Icon/paragraphincreaseindentation.png
ManOriKnowledge/Icon/paragraphleftjustify.png
ManOriKnowledge/Icon/paragraphrightjustify.png
ManOriKnowledge/KnowledgeItem.cs
ManOriKnowledge/ManOriKnowledge.csproj
ManOriKnowledge/Properties/AssemblyInfo.cs
ManOriKnowledge/Properties/Resources.Designer.cs
ManOriKnowledge/Properties/Resources.resx
ManOriKnowledge/Properties/Settings.Designer.cs
ManOriKnowledge/Properties/Settings.settings
ManOriKnowledge/Window1.xaml
ManOriKnowledge/Window1.xaml.cs
ManOriKnowledge/Icon
ManOriKnowledge/Properties
ManOriKnowledge
www.dssz.com.txt
ManOriKnowledge/App.xaml.cs
ManOriKnowledge/chocolate.xaml
ManOriKnowledge/Db4oClientConfiger.cs
ManOriKnowledge/Icon/charactergrowfont.png
ManOriKnowledge/Icon/charactershrinkfont.png
ManOriKnowledge/Icon/editcopy.png
ManOriKnowledge/Icon/editcu.png
ManOriKnowledge/Icon/editpaste.png
ManOriKnowledge/Icon/editredo.png
ManOriKnowledge/Icon/editundo.png
ManOriKnowledge/Icon/fileNew.png
ManOriKnowledge/Icon/fileopen.png
ManOriKnowledge/Icon/filesave.png
ManOriKnowledge/Icon/fileSaveas.png
ManOriKnowledge/Icon/listbullets.png
ManOriKnowledge/Icon/listnumbering.png
ManOriKnowledge/Icon/paragraphcenterjustify.png
ManOriKnowledge/Icon/paragraphdecreaseindentation.png
ManOriKnowledge/Icon/paragraphfulljustify.png
ManOriKnowledge/Icon/paragraphincreaseindentation.png
ManOriKnowledge/Icon/paragraphleftjustify.png
ManOriKnowledge/Icon/paragraphrightjustify.png
ManOriKnowledge/KnowledgeItem.cs
ManOriKnowledge/ManOriKnowledge.csproj
ManOriKnowledge/Properties/AssemblyInfo.cs
ManOriKnowledge/Properties/Resources.Designer.cs
ManOriKnowledge/Properties/Resources.resx
ManOriKnowledge/Properties/Settings.Designer.cs
ManOriKnowledge/Properties/Settings.settings
ManOriKnowledge/Window1.xaml
ManOriKnowledge/Window1.xaml.cs
ManOriKnowledge/Icon
ManOriKnowledge/Properties
ManOriKnowledge
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.