public void InitializeWith(TModel pkModel, IDiagramOptions diagramOptions) { PkModel = pkModel; DiagramOptions = diagramOptions ?? new DiagramOptions(); DiagramModel.DiagramOptions = DiagramOptions; if (IsInitialized) { return; } try { DiagramModel.BeginUpdate(); UpdateDiagramModel(PkModel, DiagramModel, coupleAll: true); RefreshFromDiagramOptions(); } finally { DiagramModel.EndUpdate(); } IsInitialized = true; }
public static void InitializeDiagramManager <T>(this T withDiagramModel, IDiagramOptions diagramOptions) where T : IWithDiagramFor <T> { withDiagramModel.DiagramManager.InitializeWith(withDiagramModel, diagramOptions); }
public void Show(IDiagramOptions diagramOptions) { _screenBinder.BindToSource(diagramOptions); _colorBinder.BindToSource(diagramOptions.DiagramColors); }
private IEnumerable <NodeSize> getNodeSizes(IDiagramOptions diagramOptions) { return(EnumHelper.AllValuesFor <NodeSize>()); }