コード例 #1
0
        private void OnModelChangeNotified(Type notifierType, Type modelType)
        {
            if (!ShowChanges)
            {
                return;
            }
            ModelRelationsWidget widget = GetOrCreateModelRelationWidget(modelType);

            widget.AddChanger(notifierType);
            RepositionModelRelationsWidgets();
        }
コード例 #2
0
        private void OnModelDeleteHandled(Type handlerType, Type modelType)
        {
            if (!ShowDeletions)
            {
                return;
            }
            ModelRelationsWidget widget = GetOrCreateModelRelationWidget(modelType);

            widget.AddDeleteHandler(handlerType);
            RepositionModelRelationsWidgets();
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public ModelActorWidget(Type modelType, ModelRelationsWidget modelRelationsWidget) : base()
 {
     ModelType = modelType;
     this.modelRelationsWidget = modelRelationsWidget;
     TypeName = CodeControlEditorHelper.GetActualTypeName(modelType);
 }
コード例 #5
0
 public void RemoveModelRelationsWidget(ModelRelationsWidget widget)
 {
     modelRelationsWidgets.Remove(widget);
     RepositionModelRelationsWidgets();
 }