c#
VB
c++
Java
公共静态无效保存(
字符串文件名,
AnnBatesStampComposer作曲家
)
公共过载共享子保存(_
按值传递文件名作为字符串,_
按值传递作曲家作为AnnBatesStampComposer_
)
公共:
静态无效保存(
字符串^文件名,
AnnBatesStampComposer^作曲家
)
文件名
将数据保存到目标文件的名字。
作曲家
的AnnBatesStampComposer得救。这个值不能零。
这个例子将创建贝茨邮票作曲家,将其保存到文件和从文件加载它。
使用Leadtools.Annotations.Engine;
使用Leadtools.Annotations.Automation;
使用Leadtools.Annotations.Rendering;
使用Leadtools.Annotations.WinForms;
使用Leadtools.Annotations.BatesStamp;
公共无效AnnBatesStampComposer_SaveLoad ()
{
/ /创建贝茨邮票对象上使用我们的测试
AnnBatesStamp batesStamp =新AnnBatesStamp ();
batesStamp.Elements.Add (新AnnBatesNumber ());
/ /创建贝茨邮票作曲家,我们要保存和加载
AnnBatesStampComposer作曲家=新AnnBatesStampComposer ();
/ /创建新的容器和将它附加到贝茨邮票作曲家邮票。
AnnContainer batesStampContainer =新AnnContainer ();
composer.TargetContainers.Add (batesStampContainer);
composer.Stamps.Add (batesStamp);
/ /打印贝茨邮票的内容对象
Debug.WriteLine (composer.Stamps [0] .AsString (batesStampContainer));/ /输出将“000001”
/ /为了节省临时文件,如果文件不存在,它将被创建在specfied路径
字符串tempFile = Path.Combine (LEAD_VARS.ImagesDir,“temp.xml”);
/ /将作曲家保存到临时文件然后再加载它
AnnBatesStampComposer。保存(tempFile,作曲家);
AnnBatesStampComposer loadedComposer = AnnBatesStampComposer.Load (tempFile);
loadedComposer.TargetContainers.Add (batesStampContainer);
/ /打印贝茨邮票的内容对象再次确保负载是正确的。
Debug.WriteLine (loadedComposer.Stamps [0] .AsString (batesStampContainer));/ /输出将“000001”
}
静态类LEAD_VARS
{
公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;
}
进口Leadtools
进口Leadtools.Annotations.Engine
进口Leadtools.Annotations.Automation
进口Leadtools.Annotations.Rendering
进口Leadtools.Annotations.WinForms
进口Leadtools.Annotations.BatesStamp
进口LeadtoolsExamples.Common
公共子AnnBatesStampComposer_SaveLoad ()
“创建贝茨邮票对象上使用我们的测试
昏暗的batesStamp作为AnnBatesStamp =新AnnBatesStamp ()
batesStamp.Elements.Add (新AnnBatesNumber ())
“创建贝茨邮票作曲家,我们想保存和加载
昏暗的作曲家作为AnnBatesStampComposer =新AnnBatesStampComposer ()
“创建新的容器和将它附加到贝茨邮票作曲家邮票。
昏暗的batesStampContainer作为AnnContainer =新AnnContainer ()
composer.TargetContainers.Add (batesStampContainer)
composer.Stamps.Add (batesStamp)
贝茨邮票的印刷内容对象
Debug.WriteLine (composer.Stamps (0) .AsString (batesStampContainer))的输出将“000001”
为了节省的临时文件,如果文件不存在,它将被创建在spcefied路径
昏暗的tempFile作为字符串= Path.Combine (ImagesPath.Path“temp.xml”)
“拯救作曲家临时文件然后再加载它
AnnBatesStampComposer。保存(tempFile,作曲家)
昏暗的loadedComposer作为AnnBatesStampComposer = AnnBatesStampComposer.Load (tempFile)
loadedComposer.TargetContainers.Add (batesStampContainer)
贝茨邮票的印刷内容对象再次确保负载是正确的。
Debug.WriteLine (loadedComposer.Stamps (0) .AsString (batesStampContainer))的输出将“000001”
结束子
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗Web查看器net
188宝金博怎么下载
支持的平台上
net, Java, Android和iOS / macOS组件
C / c++类库的API
HTML5 JavaScript库
你的邮件已经发送到支持!有人应该联系!如果你的问题是紧急请回到聊天。
聊天时间:
周一——周五,上午6点等
谢谢你的反馈!
请填写表单重新开始一个新的聊天。
所有代理目前离线。
聊天时间:
周一-周五
早上8:30 - 6点
联系我们请填写这张表格,我们将通过电子邮件联系你。