private void UpdateTranslationSlaves() { NShape shape = (view.Selection.AnchorNode as NShape); if (shape == null) { return; } NTranslationSlaves slaves = shape.TranslationSlaves; slaves.ConnectedShapes = connectedShapesCheck.Checked; slaves.IncomingShapes = incommingShapesCheck.Checked; slaves.OutgoingShapes = outgoingShapesCheck.Checked; slaves.ReflexiveShapes = reflexiveShapesCheck.Checked; slaves.FromShape = fromShapeCheck.Checked; slaves.ToShape = toShapeCheck.Checked; slaves.NeighbourShapes = neighbourShapesCheck.Checked; slaves.SourceShapes = sourceShapesCheck.Checked; slaves.DestinationShapes = destinationShapesCheck.Checked; slaves.AccessibleShapes = accessibleShapesCheck.Checked; slaves.PredecessorShapes = predecessorShapesCheck.Checked; slaves.SuccessorShapes = successorShapesCheck.Checked; shape.TranslationSlaves = slaves; }
private void EventSinkService_OnNodeSelected(NNodeEventArgs args) { PauseEventsHandling(); NShape shape = (args.Node as NShape); if (shape == null) { shapeTranslationSlavesGroup.Enabled = false; return; } // update form controls shapeTranslationSlavesGroup.Enabled = true; NTranslationSlaves slaves = shape.TranslationSlaves; connectedShapesCheck.Checked = slaves.ConnectedShapes; incommingShapesCheck.Checked = slaves.IncomingShapes; outgoingShapesCheck.Checked = slaves.OutgoingShapes; reflexiveShapesCheck.Checked = slaves.ReflexiveShapes; neighbourShapesCheck.Checked = slaves.NeighbourShapes; sourceShapesCheck.Checked = slaves.NeighbourShapes; destinationShapesCheck.Checked = slaves.DestinationShapes; accessibleShapesCheck.Checked = slaves.AccessibleShapes; predecessorShapesCheck.Checked = slaves.PredecessorShapes; successorShapesCheck.Checked = slaves.SuccessorShapes; fromShapeCheck.Checked = slaves.FromShape; toShapeCheck.Checked = slaves.ToShape; ResumeEventsHandling(); // update highligts UpdateHighlights(); document.SmartRefreshAllViews(); }