本文整理汇总了C#中System.Workflow.ComponentModel.Design.StructuredCompositeActivityDesigner.ContainedDesigners属性的典型用法代码示例。如果您正苦于以下问题:C# StructuredCompositeActivityDesigner.ContainedDesigners属性的具体用法?C# StructuredCompositeActivityDesigner.ContainedDesigners怎么用?C# StructuredCompositeActivityDesigner.ContainedDesigners使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。
在下文中一共展示了StructuredCompositeActivityDesigner.ContainedDesigners属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateNewBranch
protected override CompositeActivity OnCreateNewBranch()
{
return new ParallelIfBranch();
}
private void OnAddBranch(object sender, EventArgs e)
{
CompositeActivity activity1 = this.OnCreateNewBranch();
CompositeActivity activity2 = base.Activity as CompositeActivity;
if ((activity2 != null) && (activity1 != null))
{
int num1 = this.ContainedDesigners.Count;
Activity[] activityArray1 = new Activity[] { activity1 };
if (CanInsertActivities(new ConnectorHitTestInfo(this, HitTestLocations.Designer, activity2.Activities.Count),
new List<Activity>(activityArray1).AsReadOnly()))
{
CompositeActivityDesigner.InsertActivities(this,
new ConnectorHitTestInfo(this, HitTestLocations.Designer, activity2.Activities.Count),
new List<Activity>(activityArray1).AsReadOnly(),
string.Format("Adding branch {0}", activity1.GetType().Name));
if ((this.ContainedDesigners.Count > num1) && (this.ContainedDesigners.Count > 0))
{
this.ContainedDesigners[this.ContainedDesigners.Count - 1].EnsureVisible();
}
}
}
}
开发者ID:.NET开发者,项目名称:System.Workflow.ComponentModel.Design,代码行数:30,代码来源:StructuredCompositeActivityDesigner.ContainedDesigners