내보내기(0) 인쇄
모두 확장

RuleConditionDialog 클래스

This dialog is normally used by the activities IfElseBranchActivity, WhileActivity, ConditionedActivityGroup and ReplicatorActivity to edit declarative conditions. However, if you want to use conditions outside of these activities (for example, edit a condition for use outside of a workflow completely), you can use this dialog to perform the editing of the condition.

네임스페이스: System.Workflow.Activities.Rules.Design
어셈블리: System.Workflow.Activities(system.workflow.activities.dll)

public class RuleConditionDialog : Form
public class RuleConditionDialog extends Form
public class RuleConditionDialog extends Form
적용할 수 없음.

To use the dialog box, create an instance and show the dialog. If OK is selected, the property Expression contains the CodeExpression entered by the user.

For example, to create a CodeExpression where the "this" activity is a class of your choosing, and execute the condition if OK is pressed, you could use:

    // No expression to start with
    CodeExpression expression = null;

    using (RuleConditionDialog dialog = new RuleConditionDialog(typeof(TestClass), null, expression))
    {
        if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {
            expression = dialog.Expression;
            RuleExpressionCondition condition = new RuleExpressionCondition(expression);
            RuleValidation validation = new RuleValidation(typeof(TestClass), null);
            if (condition.Validate(validation))
            {
                RuleValidation execution = new RuleExecution(validation, new TestClass());
                Console.WriteLine("Expression evaluates to " + condition.Evaluate(execution));
            }
        }
    }

System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
       System.Windows.Forms.Control
         System.Windows.Forms.ScrollableControl
           System.Windows.Forms.ContainerControl
             System.Windows.Forms.Form
              System.Workflow.Activities.Rules.Design.RuleConditionDialog

이 형식의 모든 public static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

Microsoft .NET Framework 3.0은 Windows Vista, Microsoft Windows XP SP2 및 Windows Server 2003 SP1에서 지원됩니다.

.NET Framework

3.0에서 지원

커뮤니티 추가 항목

추가
Microsoft는 MSDN 웹 사이트에 대한 귀하의 의견을 이해하기 위해 온라인 설문 조사를 진행하고 있습니다. 참여하도록 선택하시면 MSDN 웹 사이트에서 나가실 때 온라인 설문 조사가 표시됩니다.

참여하시겠습니까?
표시:
© 2015 Microsoft