private void OnModelChangeNotified(Type notifierType, Type modelType) { if (!ShowChanges) { return; } ModelRelationsWidget widget = GetOrCreateModelRelationWidget(modelType); widget.AddChanger(notifierType); RepositionModelRelationsWidgets(); }
private void OnModelDeleteHandled(Type handlerType, Type modelType) { if (!ShowDeletions) { return; } ModelRelationsWidget widget = GetOrCreateModelRelationWidget(modelType); widget.AddDeleteHandler(handlerType); RepositionModelRelationsWidgets(); }
private ModelRelationsWidget GetOrCreateModelRelationWidget(Type type) { ModelRelationsWidget widget = modelRelationsWidgets.Find(x => x.ModelType == type); if (widget != null) { return(widget); } widget = new ModelRelationsWidget(type, this); modelRelationsWidgets.Add(widget); return(widget); }
public ModelActorWidget(Type modelType, ModelRelationsWidget modelRelationsWidget) : base() { ModelType = modelType; this.modelRelationsWidget = modelRelationsWidget; TypeName = CodeControlEditorHelper.GetActualTypeName(modelType); }
public void RemoveModelRelationsWidget(ModelRelationsWidget widget) { modelRelationsWidgets.Remove(widget); RepositionModelRelationsWidgets(); }