.NET Framework Class Library
RuleSetDialog Class

This dialog is normally used by PolicyActivity to edit rule sets. However, if you want to use a rule set outside of this activity (for example, edit a rule set for use outside of a workflow), you can use this dialog to perform the editing of the rule set.

Namespace:  System.Workflow.Activities.Rules.Design
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)
Syntax

Visual Basic (Declaration)
Public Class RuleSetDialog _
    Inherits Form
Visual Basic (Usage)
Dim instance As RuleSetDialog
C#
public class RuleSetDialog : Form
Visual C++
public ref class RuleSetDialog : public Form
JScript
public class RuleSetDialog extends Form
Remarks

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

Examples

To create a RuleSet where the "this" activity is a class of your choosing, and execute the RuleSet if OK is pressed, you could use:

C#
    RuleSet ruleSet = null;        // no rule set to start with
    using (RuleSetDialog dialog = new RuleSetDialog(typeof(TestClass), null, ruleSet))
    {
        if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {
            ruleSet = dialog.RuleSet;
            RuleValidation validation = new RuleValidation(typeof(TestClass), null);
            RuleEngine engine = new RuleEngine(ruleSet, validation);
            TestClass testObject = new TestClass();
            engine.Execute(testObject);
        }
    }
Inheritance Hierarchy

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..::.RuleSetDialog
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0
See Also

Reference

Tags :


Page view tracker