protected override void SetupHandler() { OptionGroup toplevelGroup = Handler.AddGroup(TOP_LEVEL); //the toplevel group will show neither in Table view nor in dialog view explicitely //it's children will be shown one level above toplevelGroup.SetAttribute(TableEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)TableEditorFactory.RenderingHints.Invisible); toplevelGroup.SetAttribute(DefaultEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)DefaultEditorFactory.RenderingHints.Invisible); OptionGroup spcg = toplevelGroup.AddGroup(SourcePortConstraints); spcg.AddGeneric(PortConstraintStr, PortConstraintType.Any).SetAttribute(OptionItem.SUPPORT_NULL_VALUE_ATTRIBUTE, false); spcg.AddBool(StrongPortConstraint, false); OptionGroup tpcg = toplevelGroup.AddGroup(TargetPortConstraints); tpcg.AddGeneric(PortConstraintStr, PortConstraintType.Any).SetAttribute(OptionItem.SUPPORT_NULL_VALUE_ATTRIBUTE, false); tpcg.AddBool(StrongPortConstraint, false); CollectionOptionItem <string> scopeItem = toplevelGroup.AddList(Scope, scopes, ScopeAllEdges); BoolOptionItem clearItem = toplevelGroup.AddBool(ClearAllConstraints, false); ConstraintManager cm = new ConstraintManager(Handler); cm.SetEnabledOnValueEquals(clearItem, false, spcg); cm.SetEnabledOnValueEquals(clearItem, false, scopeItem); cm.SetEnabledOnValueEquals(clearItem, false, tpcg); }
///<inheritdoc/> protected override void SetupHandler() { ConstraintManager cm = new ConstraintManager(Handler); OptionGroup toplevelGroup = Handler.AddGroup(TOP_LEVEL); //the toplevel group will show neither in Table view nor in dialog view explicitely //it's children will be shown one level above toplevelGroup.SetAttribute(TableEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)TableEditorFactory.RenderingHints.Invisible); toplevelGroup.SetAttribute(DefaultEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)DefaultEditorFactory.RenderingHints.Invisible); OptionGroup generalGroup = toplevelGroup.AddGroup(GENERAL); OptionItem operationItem = generalGroup.AddList(OPERATION, operationEnum.Keys, SCALE); generalGroup.AddBool(ACT_ON_SELECTION_ONLY, false); OptionGroup rotateGroup = toplevelGroup.AddGroup(ROTATE); cm.SetEnabledOnValueEquals(operationItem, ROTATE, rotateGroup); rotateGroup.AddInt(ROTATION_ANGLE, (int)transformer.RotationAngle, -360, 360); rotateGroup.AddBool(APPLY_BEST_FIT_ROTATION, applyBestFitRotation); OptionGroup scaleGroup = toplevelGroup.AddGroup(SCALE); cm.SetEnabledOnValueEquals(operationItem, SCALE, scaleGroup); scaleGroup.AddDouble(SCALE_FACTOR, transformer.ScaleFactorX, 0.1, 10.0); scaleGroup.AddBool(SCALE_NODE_SIZE, transformer.ScaleNodeSize); OptionGroup translateGroup = toplevelGroup.AddGroup(TRANSLATE); cm.SetEnabledOnValueEquals(operationItem, TRANSLATE, translateGroup); translateGroup.AddDouble(TRANSLATE_X, transformer.TranslateX); translateGroup.AddDouble(TRANSLATE_Y, transformer.TranslateY); }
///<inheritdoc/> protected override void SetupHandler() { createRouter(); OptionGroup toplevelGroup = Handler.AddGroup(TOP_LEVEL); //the toplevel group will show neither in Table view nor in dialog view explicitely toplevelGroup.SetAttribute(TableEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)TableEditorFactory.RenderingHints.Invisible); toplevelGroup.SetAttribute(DefaultEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)DefaultEditorFactory.RenderingHints.Invisible); OptionGroup layoutGroup = toplevelGroup.AddGroup(LAYOUT_OPTIONS); OptionGroup costGroup = toplevelGroup.AddGroup(COST); if (router.PathFinderStrategy is OrthogonalPatternEdgeRouter) { OrthogonalPatternEdgeRouter oper = (OrthogonalPatternEdgeRouter)router.PathFinderStrategy; layoutGroup.AddList(PATHFINDER, pathFinderList, ORTHOGONAL_PATTERN_PATH_FINDER); layoutGroup.AddList(SCOPE, scopes, SCOPE_ALL_EDGES); layoutGroup.AddDouble(MINIMUM_DISTANCE, oper.MinimumDistance); layoutGroup.AddBool(ACTIVATE_GRID_ROUTING, oper.GridRouting); layoutGroup.AddDouble(GRID_SPACING, oper.GridSpacing, 2.0, Double.MaxValue); ConstraintManager cm = new ConstraintManager(Handler); cm.SetEnabledOnValueEquals(layoutGroup[ACTIVATE_GRID_ROUTING], true, layoutGroup[GRID_SPACING]); costGroup.AddDouble(BEND_COST, oper.BendCost); cm.SetEnabledOnValueEquals(layoutGroup[PATHFINDER], ORTHOGONAL_PATTERN_PATH_FINDER, costGroup[BEND_COST]); costGroup.AddDouble(EDGE_CROSSING_COST, oper.EdgeCrossingCost); cm.SetEnabledOnValueEquals(layoutGroup[PATHFINDER], ORTHOGONAL_PATTERN_PATH_FINDER, costGroup[EDGE_CROSSING_COST]); costGroup.AddDouble(NODE_CROSSING_COST, oper.NodeCrossingCost); cm.SetEnabledOnValueEquals(layoutGroup[PATHFINDER], ORTHOGONAL_PATTERN_PATH_FINDER, costGroup[NODE_CROSSING_COST]); } else { layoutGroup.AddList(PATHFINDER, pathFinderList, ORTHOGONAL_PATTERN_PATH_FINDER); layoutGroup.AddList(SCOPE, scopes, SCOPE_ALL_EDGES); layoutGroup.AddDouble(MINIMUM_DISTANCE, 10); layoutGroup.AddBool(ACTIVATE_GRID_ROUTING, true); layoutGroup.AddDouble(GRID_SPACING, 20); ConstraintManager cm = new ConstraintManager(Handler); cm.SetEnabledOnValueEquals(layoutGroup[ACTIVATE_GRID_ROUTING], true, layoutGroup[GRID_SPACING]); costGroup.AddDouble(BEND_COST, 1); cm.SetEnabledOnValueEquals(layoutGroup[PATHFINDER], ORTHOGONAL_PATTERN_PATH_FINDER, costGroup[BEND_COST]); costGroup.AddDouble(EDGE_CROSSING_COST, 5); cm.SetEnabledOnValueEquals(layoutGroup[PATHFINDER], ORTHOGONAL_PATTERN_PATH_FINDER, costGroup[EDGE_CROSSING_COST]); costGroup.AddDouble(NODE_CROSSING_COST, 50); cm.SetEnabledOnValueEquals(layoutGroup[PATHFINDER], ORTHOGONAL_PATTERN_PATH_FINDER, costGroup[NODE_CROSSING_COST]); } }
///<inheritdoc/> protected override void SetupHandler() { createRouter(); OptionGroup layoutGroup = Handler.AddGroup(LAYOUT_OPTIONS); layoutGroup.SetAttribute(TableEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)TableEditorFactory.RenderingHints.Invisible); layoutGroup.SetAttribute(DefaultEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)DefaultEditorFactory.RenderingHints.Invisible); layoutGroup.AddBool(SELECTION_ONLY, false); layoutGroup.AddInt(MINIMAL_NODE_DISTANCE, (int)router.MinimumDistance, 10, int.MaxValue); layoutGroup.AddBool(USE_BENDS, router.KeepExistingBends); layoutGroup.AddBool(ROUTE_ONLY_NECESSARY, !router.RouteAllEdges); layoutGroup.AddBool(ALLOW_MOVING_NODES, false); }
///<inheritdoc/> protected override void SetupHandler() { OptionGroup layoutGroup = Handler.AddGroup(GENERAL); layoutGroup.SetAttribute(TableEditorFactory.RENDERING_HINTS_ATTRIBUTE, TableEditorFactory.RenderingHints.Invisible); layoutGroup.SetAttribute(DefaultEditorFactory.RENDERING_HINTS_ATTRIBUTE, DefaultEditorFactory.RenderingHints.Invisible); layoutGroup.AddList(ROUTING_TO_SUBGRAPH, routingStrategies.Keys, ROUTING_TO_SUBGRAPH_AUTO); layoutGroup.AddList(MODE_COMPONENT_ASSIGNMENT, componentAssignment.Keys, MODE_COMPONENT_CONNECTED); layoutGroup.AddList(SUBGRAPH_LAYOUT, subgraphLayouts, subgraphLayouts[0]); layoutGroup.AddList(SUBGRAPH_POSITION_STRATEGY, subgraphPlacementStrategies.Keys, SUBGRAPH_POSITIONING_STRATEGY_FROM_SKETCH); layoutGroup.AddInt(MIN_NODE_DIST, 30, 1, 100); layoutGroup.AddList(ORIENTATION_MAIN_GRAPH, layoutOrientation.Keys, ORIENTATION_MAIN_GRAPH_AUTO_DETECT); layoutGroup.AddBool(CONSIDER_SNAPLINES, true); layoutGroup.AddBool(CONSIDER_EDGE_DIRECTION, false); }
protected override void SetupHandler() { OptionGroup toplevelGroup = Handler.AddGroup(TOP_LEVEL); //the toplevel group will show neither in Table view nor in dialog view explicitely //it's children will be shown one level above toplevelGroup.SetAttribute(TableEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)TableEditorFactory.RenderingHints.Invisible); toplevelGroup.SetAttribute(DefaultEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)DefaultEditorFactory.RenderingHints.Invisible); var sourceIdItem = toplevelGroup.AddString(SourceID, ""); var targetIdItem = toplevelGroup.AddString(TargetID, ""); CollectionOptionItem <string> scopeItem = toplevelGroup.AddList(Scope, scopes, ScopeAllEdges); var clearItem = toplevelGroup.AddBool(ClearAllConstraints, false); ConstraintManager cm = new ConstraintManager(Handler); cm.SetEnabledOnValueEquals(clearItem, false, sourceIdItem); cm.SetEnabledOnValueEquals(clearItem, false, scopeItem); cm.SetEnabledOnValueEquals(clearItem, false, targetIdItem); }
///<inheritdoc/> protected override void SetupHandler() { createRouter(); OptionGroup layoutGroup = Handler.AddGroup(TOP_LEVEL); layoutGroup.SetAttribute(TableEditorFactory.RENDERING_HINTS_ATTRIBUTE, TableEditorFactory.RenderingHints.Invisible); layoutGroup.SetAttribute(DefaultEditorFactory.RENDERING_HINTS_ATTRIBUTE, DefaultEditorFactory.RenderingHints.Invisible); ConstraintManager cm = new ConstraintManager(Handler); layoutGroup.AddList(SCOPE, scopes, SCOPE_ALL_EDGES); layoutGroup.AddBool(USE_SELECTED_EDGES_AS_MASTER, false); layoutGroup.AddBool(CONSIDER_EDGE_DIRECTION, router.DirectedMode); layoutGroup.AddBool(USE_ADAPTIVE_LINE_DISTANCE, router.AdaptiveLineDistances); layoutGroup.AddInt(LINE_DISTANCE, (int)router.LineDistance, 0, 50); IOptionItem joinEndsItem = layoutGroup.AddBool(JOINS_ENDS, router.JoinEnds); IOptionItem joinDistanceItem = layoutGroup.AddInt(JOIN_DISTANCE, (int)router.AbsJoinEndDistance, 0, 50); cm.SetEnabledOnValueEquals(joinEndsItem, true, joinDistanceItem); }
/// <summary> /// Creates the option handler for the label editing properties. /// </summary> /// <remarks> /// These options either delegate directly to properties of <see cref="GraphEditorInputMode" /> or set some global flag /// that is evaluated elsewhere. /// </remarks> private OptionHandler CreateOptionHandler() { var graphEditorInputMode = ((GraphEditorInputMode)GraphControl.InputMode); var handler = new OptionHandler("Labeling Options"); OptionGroup toplevelGroup = handler.AddGroup("TOP_LEVEL"); //the toplevel group will show neither in Table view nor in dialog view explicitely toplevelGroup.SetAttribute(TableEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)TableEditorFactory.RenderingHints.Invisible); toplevelGroup.SetAttribute(DefaultEditorFactory.RENDERING_HINTS_ATTRIBUTE, (int)DefaultEditorFactory.RenderingHints.Invisible); OptionGroup currentGroup = toplevelGroup.AddGroup("General"); var labelAddItem = currentGroup.AddBool("Label Creation", true); labelAddItem.PropertyChanged += delegate { graphEditorInputMode.AllowAddLabel = (bool)labelAddItem.Value; }; var labelEditItem = currentGroup.AddBool("Label Editing", true); labelEditItem.PropertyChanged += delegate { graphEditorInputMode.AllowEditLabel = (bool)labelEditItem.Value; }; var hideItem = currentGroup.AddBool("Hide Label during Editing", true); hideItem.PropertyChanged += delegate { graphEditorInputMode.HideLabelDuringEditing = (bool)hideItem.Value; }; var instantTypingItem = currentGroup.AddBool("Instant Typing", false); instantTypingItem.PropertyChanged += delegate { instantTypingEnabled = (bool)instantTypingItem.Value; }; var useCustomHelperItem = currentGroup.AddBool("Custom Label Helper", false); useCustomHelperItem.PropertyChanged += delegate { customHelperEnabled = (bool)useCustomHelperItem.Value; }; currentGroup = toplevelGroup.AddGroup("Editable Items"); // Disable the whole editable items group if neither label editing or adding allowed ConstraintManager cm = new ConstraintManager(handler); cm.SetEnabledOnCondition( ConstraintManager.LogicalCondition.Or(cm.CreateValueEqualsCondition(labelEditItem, true), cm.CreateValueEqualsCondition(labelAddItem, true)), currentGroup); currentGroup.AddBool("Nodes", true).PropertyChanged += delegate { var editNodes = (bool)toplevelGroup.GetValue("Editable Items", "Nodes"); if (editNodes) { graphEditorInputMode.LabelEditableItems |= GraphItemTypes.Node | GraphItemTypes.NodeLabel; } else { graphEditorInputMode.LabelEditableItems &= ~(GraphItemTypes.Node | GraphItemTypes.NodeLabel); } }; currentGroup.AddBool("Edges", true).PropertyChanged += delegate { var editEdges = (bool)toplevelGroup.GetValue("Editable Items", "Edges"); if (editEdges) { graphEditorInputMode.LabelEditableItems |= GraphItemTypes.Edge | GraphItemTypes.EdgeLabel; } else { graphEditorInputMode.LabelEditableItems &= ~(GraphItemTypes.Edge | GraphItemTypes.EdgeLabel); } }; currentGroup = toplevelGroup.AddGroup("Validation"); var validationItem = currentGroup.AddBool("Enable Validation", false); validationItem.PropertyChanged += delegate { validationEnabled = (bool)validationItem.Value; }; var patternItem = currentGroup.AddString("Pattern", DefaultValidationPattern); patternItem.PropertyChanged += delegate { validationPattern = new Regex((string)patternItem.Value, RegexOptions.Compiled); }; // Editing the pattern doesn't make sense if validation is disabled cm.SetEnabledOnValueEquals(validationItem, true, patternItem); return(handler); }
///<inheritdoc/> protected override void SetupHandler() { OptionGroup generalGroup = Handler.AddGroup(GENERAL); OptionGroup interactionGroup = generalGroup.AddGroup(INTERACTION); interactionGroup.AddBool(SELECTED_ELEMENTS_INCREMENTALLY, false); IOptionItem useDrawingItem = interactionGroup.AddBool(USE_DRAWING_AS_SKETCH, false); interactionGroup.SetAttribute(TableEditorFactory.RENDERING_HINTS_ATTRIBUTE, TableEditorFactory.RenderingHints.Invisible); generalGroup.AddList(ORIENTATION, orientEnum.Keys, TOP_TO_BOTTOM); generalGroup.AddBool(LAYOUT_COMPONENTS_SEPARATELY, false); IOptionItem symmetricPlacement = generalGroup.AddBool(SYMMETRIC_PLACEMENT, true); generalGroup.AddInt(MAXIMUM_DURATION, 5); OptionGroup distanceGroup = generalGroup.AddGroup(MINIMUM_DISTANCES); distanceGroup.AddDouble(NODE_TO_NODE_DISTANCE, 30.0d); distanceGroup.AddDouble(NODE_TO_EDGE_DISTANCE, 15.0d); distanceGroup.AddDouble(EDGE_TO_EDGE_DISTANCE, 15.0d); distanceGroup.AddDouble(MINIMUM_LAYER_DISTANCE, 10.0d); OptionGroup edgeSettingsGroup = Handler.AddGroup(EDGE_SETTINGS); OptionItem eoi = edgeSettingsGroup.AddList(EDGE_ROUTING, edgeRoutingEnum.Keys, EDGE_ROUTING_ORTHOGONAL); edgeSettingsGroup.AddBool(BACKLOOP_ROUTING, false); edgeSettingsGroup.AddBool(AUTOMATIC_EDGE_GROUPING_ENABLED, false); IOptionItem edgeStraightening = edgeSettingsGroup.AddBool(EDGE_STRAIGHTENING_OPTIMIZATION_ENABLED, false); edgeSettingsGroup.AddBool(CONSIDER_EDGE_THICKNESS, false); edgeSettingsGroup.AddBool(CONSIDER_EDGE_DIRECTION, false); edgeSettingsGroup.AddDouble(MINIMUM_FIRST_SEGMENT_LENGTH, 10.0d); edgeSettingsGroup.AddDouble(MINIMUM_LAST_SEGMENT_LENGTH, 15.0d); edgeSettingsGroup.AddDouble(MINIMUM_EDGE_LENGTH, 20.0d); edgeSettingsGroup.AddDouble(MINIMUM_EDGE_DISTANCE, 15.0d); ConstraintManager cm = new ConstraintManager(Handler); cm.SetEnabledOnValueEquals(eoi, EDGE_ROUTING_POLYLINE, edgeSettingsGroup.AddDouble(MINIMUM_SLOPE, 0.25d, 0.0d, 5.0d)); cm.SetEnabledOnValueEquals(symmetricPlacement, false, edgeStraightening); edgeSettingsGroup.AddBool(PC_OPTIMIZATION_ENABLED, false); edgeSettingsGroup.AddList(RECURSIVE_EDGE_ROUTING, new[] { RECURSIVE_EDGE_ROUTING_OFF, RECURSIVE_EDGE_ROUTING_DIRECTED, RECURSIVE_EDGE_ROUTING_UNDIRECTED }, RECURSIVE_EDGE_ROUTING_OFF); OptionGroup rankGroup = Handler.AddGroup(RANKS); rankGroup.AddList(RANKING_POLICY, rankingPolicies.Keys, HIERARCHICAL_OPTIMAL); rankGroup.AddList(LAYER_ALIGNMENT, alignmentEnum.Keys, BOTTOM); rankGroup.AddList(COMPONENT_ARRANGEMENT_POLICY, componentAlignmentEnum.Keys, POLICY_TOPMOST); OptionGroup sketchGroup = rankGroup.AddGroup(FROM_SKETCH_PROPERTIES); sketchGroup.AddDouble(SCALE, 1.0d, 0.0d, 5.0d); sketchGroup.AddDouble(HALO, 0.0d); sketchGroup.AddDouble(MINIMUM_SIZE, 0.0d, 0, Double.MaxValue); sketchGroup.AddDouble(MAXIMUM_SIZE, 1000.0d, 0, Double.MaxValue); cm.SetEnabledOnValueEquals(Handler.GetItemByName(RANKS + "." + RANKING_POLICY), FROM_SKETCH, Handler.GetItemByName(RANKS + "." + FROM_SKETCH_PROPERTIES)); OptionGroup labelingGroup = Handler.AddGroup(LABELING); OptionGroup npGroup = labelingGroup.AddGroup(NODE_PROPERTIES); npGroup.AddBool(CONSIDER_NODE_LABELS, true); npGroup.SetAttribute(TableEditorFactory.RENDERING_HINTS_ATTRIBUTE, TableEditorFactory.RenderingHints.Invisible); //npGroup.SetAttribute(DefaultEditorFactory.RenderingHintsAttribute, // DefaultEditorFactory.RenderingHints.Invisible); OptionGroup epGroup = labelingGroup.AddGroup(LABELING_EDGE_PROPERTIES); CollectionOptionItem <string> edgeLabelingEnumItem = epGroup.AddList(EDGE_LABELING, edgeLabeling, EDGE_LABELING_NONE); CollectionOptionItem <string> labelModelItem = epGroup.AddList(EDGE_LABEL_MODEL, edgeLabelModel, EDGE_LABEL_MODEL_BEST); epGroup.SetAttribute(TableEditorFactory.RENDERING_HINTS_ATTRIBUTE, TableEditorFactory.RenderingHints.Invisible); ICondition cond = ConstraintManager.LogicalCondition.Not(cm.CreateValueEqualsCondition(edgeLabelingEnumItem, EDGE_LABELING_NONE)); cm.SetEnabledOnCondition(cond, labelModelItem); IOptionItem compactEdgeLabel = epGroup.AddBool(COMPACT_EDGE_LABEL_PLACEMENT, true); cm.SetEnabledOnValueEquals(edgeLabelingEnumItem, EDGE_LABELING_HIERARCHIC, compactEdgeLabel); OptionGroup groupingGroup = Handler.AddGroup(GROUPING); CollectionOptionItem <string> groupStrategyItem = groupingGroup.AddList(GROUP_LAYERING_STRATEGY, groupStrategyEnum.Keys, RECURSIVE_LAYERING); CollectionOptionItem <string> groupAlignItem = groupingGroup.AddList(GROUP_ALIGNMENT, groupAlignmentEnum.Keys, GROUP_ALIGN_TOP); IOptionItem groupCompactionItem = groupingGroup.AddBool(GROUP_ENABLE_COMPACTION, false); groupingGroup.AddList(GROUP_HORIZONTAL_COMPACTION, groupHorizCompactionEnum.Keys, GROUP_HORIZONTAL_COMPACTION_NONE); cm.SetEnabledOnValueEquals(groupStrategyItem, RECURSIVE_LAYERING, groupCompactionItem); cm.SetEnabledOnValueEquals(groupStrategyItem, RECURSIVE_LAYERING, groupAlignItem); cm.SetEnabledOnValueEquals(useDrawingItem, false, groupStrategyItem); cm.SetEnabledOnCondition(ConstraintManager.LogicalCondition.And(cm.CreateValueEqualsCondition(groupStrategyItem, RECURSIVE_LAYERING), cm.CreateValueEqualsCondition(groupCompactionItem, false)), groupAlignItem); cm.SetEnabledOnCondition(ConstraintManager.LogicalCondition.And(cm.CreateValueEqualsCondition(groupStrategyItem, RECURSIVE_LAYERING), cm.CreateValueEqualsCondition(useDrawingItem, false)), groupCompactionItem); OptionGroup swimGroup = Handler.AddGroup(SWIMLANES); IOptionItem swimlaneOption = swimGroup.AddBool(TREAT_ROOT_GROUPS_AS_SWIMLANES, false); IOptionItem fromSketchOption = swimGroup.AddBool(USE_ORDER_FROM_SKETCH, false); IOptionItem spacingOption = swimGroup.AddDouble(SWIMLANE_SPACING, 0.0d, 0, Double.MaxValue); cm.SetEnabledOnValueEquals(swimlaneOption, true, fromSketchOption); cm.SetEnabledOnValueEquals(swimlaneOption, true, spacingOption); OptionGroup gridGroup = Handler.AddGroup(GRID); IOptionItem gridEnabled = gridGroup.AddBool(GRID_ENABLED, false); IOptionItem gridSpacing = gridGroup.AddDouble(GRID_SPACING, 10); IOptionItem gridPortAssignment = gridGroup.AddList(GRID_PORT_ASSIGNMENT, new[] { GRID_PORT_ASSIGNMENT_DEFAULT, GRID_PORT_ASSIGNMENT_ON_GRID, GRID_PORT_ASSIGNMENT_ON_SUBGRID }, GRID_PORT_ASSIGNMENT_DEFAULT); cm.SetEnabledOnValueEquals(gridEnabled, true, gridSpacing); cm.SetEnabledOnValueEquals(gridEnabled, true, gridPortAssignment); }