没有找到合适的产品?
联系客服协助选型:023-68661681
提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
原创|使用教程|编辑:郝浩|2013-06-08 14:33:38.000|阅读 495 次
概述:业务流程图控件FlowChart.NET提供了用于创建或编辑图表的直观的用户交互模型。在本文中将会给出一部分内容关于创建一个自定义的CompositeNode 类,用于显示在组织中的独立信息,如名称、 说明和图像。节点将会通过各种公开的属性进行自定义。
# 界面/图表报表/文档/IDE等千款热门软控件火热销售中 >>
相关链接:
业务流程图控件FlowChart.NET提供了用于创建或编辑图表的直观的用户交互模型。在前面的教程中,探讨了如何创建复合节点和组件。在本文中将会给出一部分内容关于创建一个自定义的CompositeNode 类,用于显示在组织中的独立信息,如名称、 说明和图像。节点将会通过各种公开的属性进行自定义。
创建一个从CompositeNode 类派生的自定义复合节点,需要先进行声明:
C#
public class OrgChartNode : CompositeNode { }
Visual Basic
Public Class OrgChartNode Inherits CompositeNode End Class
可应用在不同的方案中创建一个自定义节点,比如,如果你想要定义在XML中的节点的内容,还想要声明对于不同组件的事件处理程序,或是你想要应用自定义组件安排逻辑或是自定义呈现。
添加一个单独的构造函数到新创建的节点类,将会使用到下面的内容:
C#
... public OrgChartNode(Diagram diagram) : base(diagram) { string content = @" <SimplePanel> <Shape Name=""Shape"" Shape=""Rectangle"" /> <Border Padding=""2""> <GridPanel> <GridPanel.Columns> <GridColumn Width=""30"" /> <GridColumn /> </GridPanel.Columns> <GridPanel.Rows> <GridRow /> </GridPanel.Rows> <Image Name=""Image"" ImageAlign=""Fit"" /> <StackPanel Orientation=""Vertical"" GridColumn=""1""> <Text Name=""Title"" Font=""Arial, 12pt, style=Bold"" TextAlignment=""Near"" /> <Text Name=""FullName"" TextColor=""Blue"" TextAlignment=""Near"" /> <Text Name=""Text"" Font=""Arial, 8pt"" TextAlignment=""Near"" /> </StackPanel> </GridPanel> </Border> </SimplePanel>"; Components.Add(XmlLoader.Load(content, null, null)); } ...
Visual Basic
... Public Sub New(ByVal diagram As Diagram) MyBase.new(diagram) Dim content As String = _ "<SimplePanel>" & _ "" & _ " <Shape Name=""Shape"" Shape=""Rectangle"" />" & _ "" & _ " <Border Padding=""2"">" & _ " <GridPanel>" & _ " <GridPanel.Columns>" & _ " <GridColumn Width=""30"" />" & _ " <GridColumn />" & _ " </GridPanel.Columns>" & _ " <GridPanel.Rows>" & _ " <GridRow />" & _ " </GridPanel.Rows>" & _ "" & _ " <Image Name=""Image"" ImageAlign=""Fit"" />" & _ "" & _ " <StackPanel Orientation=""Vertical"" GridColumn=""1"">" & _ " <Text Name=""Title"" Font=""Arial, 12pt, style=Bold"" TextAlignment=""Near"" />" & _ " <Text Name=""FullName"" TextColor=""Blue"" TextAlignment=""Near"" />" & _ " <Text Name=""Text"" Font=""Arial, 8pt"" TextAlignment=""Near"" />" & _ " </StackPanel>" & _ " </GridPanel>" & _ " </Border>" & _ "" & _ "</SimplePanel>" Components.Add(XmlLoader.Load(content, Nothing, Nothing)) End Sub ...
现在节点的内容已经定义好和导入了,将添加几个字段到指定到感兴趣的不同组件的类上,添加下面的字段到类的最后:
C#
private ShapeComponent shape; private ImageComponent image; private TextComponent title; private TextComponent fullName; private TextComponent text;
Visual Basic
Private _shape As ShapeComponent Private _image As ImageComponent Private _title As TextComponent Private _fullName As TextComponent Private _text As TextComponent
要初始化引用相应组件的字段,可以使用CompositeNode 类的FindComponent方法。在组件太能极爱到节点的组件连接之后,这个方法将会成功的运行。在组件连接到复合节点之后,在函数中添加下面的代码:
C#
... Components.Add(XmlLoader.Load(content, null, null)); shape = FindComponent("Shape") as ShapeComponent; image = FindComponent("Image") as ImageComponent; title = FindComponent("Title") as TextComponent; fullName = FindComponent("FullName") as TextComponent; text = FindComponent("Text") as TextComponent; ...
Visual Basic
... Components.Add(XmlLoader.Load(content, Nothing, Nothing)) _shape = CType(FindComponent("Shape"), ShapeComponent) _image = CType(FindComponent("Image"), ImageComponent) _title = CType(FindComponent("Title"), TextComponent) _fullName = CType(FindComponent("FullName"), TextComponent) _text = CType(FindComponent("Text"), TextComponent) ...
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@wqylolg.cn
文章转载自:慧都控件在 Web 环境中,将 PDF 转换为 HTML 有助于提升内容的可访问性和交互性。本文将介绍如何在 React 中使用 JavaScript 和 Spire.PDF for JavaScript 库将 PDF 转换为 HTML。
在本指南中,我们将探讨解锁 Excel 工作表的不同方法,例如使用免费的在线 Excel 密码删除器或使用基于代码的解决方案。
自 24.11 版以来,Aspose.Words for .NET 提供了 AI 驱动的文档摘要功能,使用户能够从冗长的文本中快速提取关键见解。在新版本25.2中,通过使用Anthropic 生成语言模型进行摘要扩展了此功能。
在本文中,将介绍一个新集成演示,包括 DHTMLX Grid 和 Pivot,并将重点介绍DHTMLX的开发团队使用这些小部件创建 JavaScript 数据透视网格时使用的一些技术技巧。
FlowChart.NET是一款能够帮助你轻松创建流程图和示意图的.NET控件,可以自定义设计样式和图表框颜色。
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@wqylolg.cn
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢