VDF常见问题整理(十七):如何初始化具有特定值的bhatch对话框?

本系列教程整理了VectorDraw Developer Framework(VDF)最常见问题,教程整理的很齐全,非常适合新手学习,本节教程将会介绍如何初始化具有特定值的bhatch对话框。

    VectorDraw Developer Framework(VDF)是一个用于应用程序可视化的图形引擎库。有了VDF提供的功能,您可以轻松地创建、编辑、管理、输出、输入和打印2D和3D图形文件。   

VectorDraw Developer Framework试用版下载


问:

   如果想初始化具有特定值的bhatch对话框或保留对话框以前的值,应该怎么做/p>

答:

    请检查下面的代码,演示如何覆盖默认的bHatch命令实现并使用特定值调用对话框。

void CommandLine_CommandExecute(string commandname, bool isDefaultImplemented, ref bool success){      if (string.Compare(commandname, "bhatch", true) == 0)      {          vdDocument doc = vdFramedControl1.BaseControl.ActiveDocument;          //Set some initial values for the dialog , This can be global to an application so these values can be changed.           //You can call the following dialog with a different constructor (with vdHatchproperties) in order to set these values in a global properties application dialog that you may have.          vdHatchProperties SetBhatchInitialValues = new vdHatchProperties();          SetBhatchInitialValues.FillMode = VectorDraw.Professional.Constants.VdConstFill.VdFillModeHatchBlock;          SetBhatchInitialValues.FillColor.ColorIndex = 0;          //Keep in a variable the current ActiveHatchProperties          vdHatchProperties KeepActiveHatch = new vdHatchProperties();          KeepActiveHatch.CopyFrom(doc.ActiveHatchProperties);          //Set the ActiveHatchProperties to the above value          doc.ActiveHatchProperties.CopyFrom(SetBhatchInitialValues);          //Call the dialog.          vdFigure ret = VectorDraw.Professional.Dialogs.frmGetHatchDialog.Show(null,doc, doc.ActionControl);          //Return ActiveHatchProperties values as it was before the dialog.          doc.ActiveHatchProperties.CopyFrom (KeepActiveHatch);          success = true;          return;      }}

    对于以上问答,如果您有任何的疑惑都可以在评论区留言,我们会及时回复。此系列的问答教程我们会持续更新,如果您感兴趣,可以多多关注本教程。

相关资料推荐:

VectorDraw Developer Framework(VDF)示例


    如果您对想要购买正版授权VectorDraw Developer Framework(VDF),可以联系在线客服>>咨询相关问题。

    关注慧聚IT微信公众号 了解产品的最新动态及最新资讯。

850×100.png

标签:

来源:慧都

声明:本站部分文章及图片转载于互联网,内容版权归原作者所有,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2019年8月17日
下一篇 2019年8月17日

相关推荐

发表回复

登录后才能评论