다음을 통해 공유


CodeCondition.Condition 이벤트

정의

조건이 확인될 때 발생합니다.

public:
 event EventHandler<System::Workflow::Activities::ConditionalEventArgs ^> ^ Condition;
public event EventHandler<System.Workflow.Activities.ConditionalEventArgs> Condition;
member this.Condition : EventHandler<System.Workflow.Activities.ConditionalEventArgs> 
Public Custom Event Condition As EventHandler(Of ConditionalEventArgs) 

이벤트 유형

예제

다음 코드에서는 현재 Condition 인스턴스의 CodeCondition 이벤트의 처리기를 연결하는 방법을 보여 줍니다. 이 코드 예제는 SimpleCAGWorkflow.designer.cs 파일에 있는 ConditionedActivityGroup SDK 샘플의 일부입니다. 자세한 내용은 를 사용 하 여 ConditionedActivityGroup합니다.

this.CanModifyActivities = true;
System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition();
System.Workflow.Activities.CodeCondition codecondition2 = new System.Workflow.Activities.CodeCondition();
this.BookingCag = new System.Workflow.Activities.ConditionedActivityGroup();
this.Car = new System.Workflow.Activities.CodeActivity();
this.Airline = new System.Workflow.Activities.CodeActivity();
//
// BookingCag
//
this.BookingCag.Activities.Add(this.Car);
this.BookingCag.Activities.Add(this.Airline);
this.BookingCag.Name = "BookingCag";
codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.CarCondition);
//
// Car
//
this.Car.Name = "Car";
this.Car.ExecuteCode += new System.EventHandler(this.Car_ExecuteCode);
this.Car.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, codecondition1);
codecondition2.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.AirlineCondition);
Me.CanModifyActivities = True
Dim codecondition1 As New System.Workflow.Activities.CodeCondition()
Dim codecondition2 As New System.Workflow.Activities.CodeCondition()
Me.BookingCag = New System.Workflow.Activities.ConditionedActivityGroup()
Me.Car = New System.Workflow.Activities.CodeActivity()
Me.Airline = New System.Workflow.Activities.CodeActivity()
' 
' BookingCag
'
Me.BookingCag.Activities.Add(Me.Car)
Me.BookingCag.Activities.Add(Me.Airline)
Me.BookingCag.Name = "BookingCag"
AddHandler codecondition1.Condition, AddressOf CarCondition
' 
' Car
' 
Me.Car.Name = "Car"
AddHandler Car.ExecuteCode, AddressOf Me.Car_ExecuteCode
Me.Car.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, codecondition1)
AddHandler codecondition2.Condition, AddressOf Me.AirlineCondition

적용 대상