加载/保存方法作为辅助方法提供给用户。的BarcodeEngine,BarcodeWriter而且BarcodeWriter不要在内部使用这些方法。
要将以前保存到XML文件中的数据加载到BarcodeWriteOptions。负载(string文件名).
若要将数据保存并加载到XML流,请使用BarcodeWriteOptions。保存(流流)而且BarcodeWriteOptions。负载(流流).
的默认写选项BarcodeWriter,使用BarcodeWriter。其
此示例创建线性1D条形码写入选项类,将其保存到磁盘,然后将其加载回来。
使用Leadtools;使用Leadtools.Codecs;使用Leadtools.Barcode;使用Leadtools.ImageProcessing;公共无效BarcodeWriteOptions_LoadSaveExample (){字符串xmlFileName = Path.Combine(LEAD_VARS.ImagesDir,“MyOptions.xml”);//创建选项OneDBarcodeWriteOptions option1 =新OneDBarcodeWriteOptions ();//显示其值ShowOptions (“默认1”, options1);//改变一些值options1。UseXModule =真正的;options1。EnableErrorCheck =真正的;options1。TextPosition = BarcodeOutputTextPosition.None;ShowOptions (“新方案1”, options1);//保存到磁盘options1.Save (xmlFileName);//创建新选项OneDBarcodeWriteOptions options2 =新OneDBarcodeWriteOptions ();//显示其值ShowOptions (“默认2”, options2);//加载之前保存的选项options2.Load (xmlFileName);//显示它的值,应该和"New Options 1"一样ShowOptions (“加载2”, options2);}私人静态无效ShowOptions (字符串信息,OneDBarcodeWriteOptions选项){//在这个例子中,我们只显示一些选项Console.WriteLine(消息);控制台。WriteLine (" UseXModule: {0}", options.UseXModule);控制台。WriteLine (" EnableErrorCheck: {0}", options.EnableErrorCheck);控制台。WriteLine (TextPosition: {0}, options.TextPosition);控制台。WriteLine ("----------------");}静态类LEAD_VARS{公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;}
进口Leadtools进口Leadtools。编解码器进口Leadtools。条形码进口Leadtools。ImageProcessing公共子BarcodeWriteOptions_LoadSaveExample ()昏暗的xmlFileName作为字符串= Path.Combine (LEAD_VARS.ImagesDir“MyOptions.xml”)创建选项昏暗的options1作为新OneDBarcodeWriteOptions ()展示它的价值ShowOptions (“默认1”options1)改变一些价值观options1。UseXModule =真正的options1。EnableErrorCheck =真正的options1。TextPosition = BarcodeOutputTextPosition。没有一个ShowOptions (“新方案1”options1)将其保存到磁盘options1.Save (xmlFileName)创建新选项昏暗的options2作为新OneDBarcodeWriteOptions ()展示它的价值ShowOptions (“默认2”options2)'加载之前保存的选项options2.Load (xmlFileName)显示它的值,应该和New Options 1一样ShowOptions (“加载2”options2)结束子私人共享子ShowOptions (按值传递消息作为字符串,按值传递选项作为OneDBarcodeWriteOptions)在这个例子中,我们只会展示一些选项Console.WriteLine(消息)控制台。WriteLine (" UseXModule: {0}"options.UseXModule)控制台。WriteLine (" EnableErrorCheck: {0}"options.EnableErrorCheck)控制台。WriteLine (TextPosition: {0}options.TextPosition)控制台。WriteLine ("----------------")结束子公共NotInheritable类LEAD_VARS公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”结束类
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗网络查看器net
188宝金博怎么下载
支持的平台上
.NET、Java、Android和iOS/macOS程序集
C API/ c++类库
HTML5 JavaScript库
您的邮件已发送给技术支持!应该有人联系!如果你的事情很紧急,请回来聊天。
聊天时间:
周一至周五,美国东部时间上午8:30至下午6:00
感谢您的反馈!
请再次填写表格,开始新的聊天。
所有代理目前都离线。
聊天时间:
星期一至星期五
美国东部时间上午8:30 -下午6点
如需与我们联系,请填写此表格,我们将通过电子邮件与您联系。
