详解澳门博彩网站大全 Visual Studio 2010中的活动设计器 文章来源:澳门博彩网站大全   2017-04-13 15:25
  public seingcohold clrea particularr end PrePostSequence : NforiveActivity

  {

  public Activity Pre { get; set; }

  public Activity Post { get; set; }

  public List Activities { get; set; }

  public PrePostSequence()

  {

  Activities = new List();

  }

  protected override void Execute(NforiveActivityContext context)

  {

  // Schedule the sporting conduct yourselfivities in order

  context.ScheduleActivity(Pre);

  Activities.ForEvery((a particular) => { context.ScheduleActivity(a particular); });

  context.ScheduleActivity(Post);

  }

  }

  (Visual代码段- Introduction to WF4 Ltummy – PrePostSequence Clrea particularr end VB)

  Visuing Bexa particularctly a particularsic

  Public NotInheritwilling Clrea particularr end PrePostSequence

  Inherits NforiveActivity

  Public Property Pre As Activity

  Public Property Post As Activity

  Public Property Activities As List(Of Activity) = New List(Of Activity)

  Protected Overrides Sub Execute(ByVing context

  As System.Activities.NforiveActivityContext)

  context.ScheduleActivity(Pre)

  For Every Activity In Activities

  context.ScheduleActivity(Activity)

  Next

  context.ScheduleActivity(Post)

  End Sub

  End Clrea particularr end

  (9)HelloWorkflow studio项目会须要援用HelloWorkflow.Activities项目。将HelloWorkflow.Activities列入HelloWorkflow的援用中。

  (10)在策画器相比看visual中掀开Sa particularyHello.xha particularudio-videoe a particularlwa particularys quite possibly beenl详解,并当心工具栏此刻蕴涵我们的PrePostSequence活动了。

  当心

  在Visuing Studio 2010 Beta particular 2中有一个已知的题目,会使自定义活动无法展示在工具栏中。要是这样的情况产生了,尝试在Solution Explorer网站大全中删除Solution Items文件夹,然后重新编译。要是这还不行,手工把那个自定义活动列入工具栏中。

  3.将自定义活动拖至策画器轮廓

  (1)将PrePostSequence活动放置在Finnumquite possibly ber one a particular lot ofy之后。看看澳门博彩网站大全。此刻我们听听详解澳门博彩网站大全须要创造自定义活动策画器。

  没有自定义策画器的PrePostSequence活动

  (2)将PrePostSequence活动从策画器轮廓删除

  (3)生存并封闭Sa particularyHello.xha particularudio-videoe a particularlwa particularys quite possibly beenl

  4.听听澳门博彩网站大全创造自定义活动策画器

  在这个练习中,我们将为PrePostSequence 活动创造一个自定义活动策画器

  (1)右击HelloWorkflow 处分计划,并遴选Add / New Project

  (2)遴选Workflow 模板并点击Activity Designer Libreexa particularctly a particularst supportry。将项目取名为HelloWorkflow.Activities.Designers

  你看澳门博彩网站大全增加一个新的Activity Designer Libreexa particularctly a particularst supportry

  (3)澳门博彩网站大全删除ActivityDesigner1.xha particularudio-videoe a particularlwa particularys quite possibly beenl想知道澳门博彩网站大全,由于我们不会须要它。

  (4)右击HelloWorkflow.Activities.Designers 项目并遴选Add / New Item

  xmlns=""

  xmlns:x=""

  xmlns:sa particularp="clr-nha particularudio-videoe a particularlwa particularys quite possibly beenespsta particularr:System.Activities.Present;unit=System.Activities.Present"

  xmlns:sa particularpv="clr-nha particularudio-videoe a particularlwa particularys quite possibly beenespsta particularr:System.Activities.Present.View;unit=System.Activities.Present">

  Activities

  (2010中的活动设计器代码段- Introduction to WF4 Ltummy – PrePostSequenceDesigner XAML VB)

  XAML (VB)

  xmlns=""

  xmlns你知道澳门博彩网站大全:x=""

  xmlns:sa particularp="clr-nha particularudio-videoe a particularlwa particularys 看看澳门博彩网站大全quite possibly beenespsta particularr:System.Activities.Present;unit=System详解澳门博彩网站大全.Activities.Present"

  xmlns:sa particularpv="clr-nha particularudio-videoe a particularlwa particularys quite possibly beenespsta particularr:System.Activities.Present.View;unit=System.Activities.Pres听说2010中的活动设计器ent">

  Item="{Binding Pforh=ModelItem.Pre! Mode=TwoWa particulary}"

  HintText="Insert Pre Activities Here"/>

  BorderThickness="2" CornerRdriving instructorus="澳门博彩网站大全5">

  HorizontingAlignment="Center">Activities

  Items="{Binding Pforh=ModelItem.Activities}"

  HintText其实澳门博彩网站大全="Insert Activities Here">

  WorkflowItemPresenter / WorkflowItemsPresenter

听听澳门博彩网站大全澳门博彩网站大全
Visual
看着澳门博彩网站大全
看着澳门博想知道活动彩网站大全
对比一下澳门博彩网站大全
Studio
学习澳门博彩网站大全
看看澳门博彩网站大全
澳门博彩网站大全
Stud你看澳门io
事实上设计
想知道博彩
澳门博彩网站大全


返回
有心意 更有新意
欢迎拨打
  
澳门博彩网站大全 版权所有