Exemple #1
0
        void table_ColumnsChanged(object sender, CollectionChangeEvent <IColumn> e)
        {
            var table = sender as Table;

            if (table == null)
            {
                return;
            }

            var shape = GetShapeFor(table) as TableShape;

            if (shape == null)
            {
                return;
            }

            switch (e.ChangeType)
            {
            case CollectionChangeAction.Addition:
                shape.Columns.Add(e.ChangedObject);
                break;

            case CollectionChangeAction.Deletion:
                shape.Columns.Remove(e.ChangedObject);
                break;
            }
        }
Exemple #2
0
 void entity_PropertiesChanged(object sender, CollectionChangeEvent <Property> e)
 {
     form.StartBulkUpdate();
     form.SetProperties(entity.ConcreteProperties);
     form.RefreshVirtualProperties();
     form.EndBulkUpdate();
 }
Exemple #3
0
        void OnEntitiesChanged(object sender, CollectionChangeEvent <Entity> e)
        {
            EntitiesChanged.RaiseEvent(entities, e);

            if (e.ChangeType == CollectionChangeAction.Addition)
            {
                SetupEventSubscriptions(e.ChangedObject);
            }
            else if (e.ChangeType == CollectionChangeAction.Deletion)
            {
                RemoveEventSubscriptions(e.ChangedObject);
            }
        }
Exemple #4
0
        void database_TablesChanged(object sender, CollectionChangeEvent <ITable> e)
        {
            switch (e.ChangeType)
            {
            case CollectionChangeAction.Addition:
                OnTableAdded(e.ChangedObject);
                break;

            case CollectionChangeAction.Deletion:
                OnTableRemoved(e.ChangedObject);
                break;
            }
        }
Exemple #5
0
        void database_RelationshipsChanged(object sender, CollectionChangeEvent <Relationship> e)
        {
            switch (e.ChangeType)
            {
            case CollectionChangeAction.Addition:
                OnRelationshipAdded(e.ChangedObject);
                break;

            case CollectionChangeAction.Deletion:
                OnRelationshipRemoved(e.ChangedObject);
                break;
            }
        }
Exemple #6
0
        void EntitySet_EntitiesChanged(object sender, CollectionChangeEvent <Entity> e)
        {
            switch (e.ChangeType)
            {
            case CollectionChangeAction.Addition:
                OnEntityAdded(e.ChangedObject);
                break;

            case CollectionChangeAction.Deletion:
                OnEntityRemoved(e.ChangedObject);
                break;
            }
        }
Exemple #7
0
        void EntitySet_ReferencesChanged(object sender, CollectionChangeEvent <Reference> e)
        {
            switch (e.ChangeType)
            {
            case CollectionChangeAction.Addition:
                OnReferenceAdded(e.ChangedObject);
                break;

            case CollectionChangeAction.Deletion:
                OnReferenceRemoved(e.ChangedObject);
                break;
            }
        }
Exemple #8
0
        void entity_ChildrenChanged(object sender, CollectionChangeEvent <Entity> e)
        {
            switch (e.ChangeType)
            {
            case CollectionChangeAction.Addition:
                OnChildAdded(e.ChangedObject, sender as Entity);
                break;

            case CollectionChangeAction.Deletion:
                OnChildRemoved(e.ChangedObject, sender as Entity);
                break;
            }
        }
Exemple #9
0
        void entity_PropertiesChanged(object sender, CollectionChangeEvent <Property> e)
        {
            var entity = sender as Entity;

            if (entity == null)
            {
                return;
            }

            var shape = GetShapeFor(entity) as EntityShape;

            if (shape == null)
            {
                return;
            }

            switch (e.ChangeType)
            {
            case CollectionChangeAction.Addition:
                if (e.ChangedObject.Entity.InternalIdentifier == entity.InternalIdentifier)
                {
                    shape.Properties.Add(e.ChangedObject);
                }
                else
                {
                    shape.InheritedProperties.Add(e.ChangedObject);
                }
                break;

            case CollectionChangeAction.Deletion:
                if (e.ChangedObject.Entity.InternalIdentifier == entity.InternalIdentifier)
                {
                    shape.Properties.Remove(e.ChangedObject);
                }
                else
                {
                    shape.InheritedProperties.Remove(e.ChangedObject);
                }
                break;
            }
        }
 void entity_ChildrenChanged(object sender, CollectionChangeEvent<Entity> e)
 {
     EntityChildrenChanged.RaiseEvent(sender, e);
 }
 void OnReferencesChanged(object sender, CollectionChangeEvent<Reference> e)
 {
     ReferencesChanged.RaiseEvent(entities, e);
 }
        void OnEntitiesChanged(object sender, CollectionChangeEvent<Entity> e)
        {
            EntitiesChanged.RaiseEvent(entities, e);

            if(e.ChangeType == CollectionChangeAction.Addition)
            {
                SetupEventSubscriptions(e.ChangedObject);
            }
            else if(e.ChangeType == CollectionChangeAction.Deletion)
            {
                RemoveEventSubscriptions(e.ChangedObject);
            }
        }
 private void OnDatabaseTablesChanged(object s, CollectionChangeEvent<ITable> e)
 {
     TablesChanged.RaiseEvent(database, e);
 }
Exemple #14
0
 private void OnDatabaseRelationshipsChanged(object sender, CollectionChangeEvent <Relationship> e)
 {
     RelationshipsChanged.RaiseEvent(database, e);
 }
Exemple #15
0
 void OnReferencesChanged(object sender, CollectionChangeEvent <Reference> e)
 {
     ReferencesChanged.RaiseEvent(entities, e);
 }
 void EntitySet_ReferencesChanged(object sender, CollectionChangeEvent<Reference> e)
 {
     switch (e.ChangeType)
     {
         case CollectionChangeAction.Addition:
             OnReferenceAdded(e.ChangedObject);
             break;
         case CollectionChangeAction.Deletion:
             OnReferenceRemoved(e.ChangedObject);
             break;
     }
 }
 void Database_TablesChanged(object sender, CollectionChangeEvent<ITable> e)
 {
     switch (e.ChangeType)
     {
         case CollectionChangeAction.Addition:
             OnTableAdded(e.ChangedObject);
             break;
         case CollectionChangeAction.Deletion:
             OnTableRemoved(e.ChangedObject);
             break;
     }
 }
 private void OnDatabaseRelationshipsChanged(object sender, CollectionChangeEvent<Relationship> e)
 {
     RelationshipsChanged.RaiseEvent(database, e);
 }
 void entity_PropertiesChanged(object sender, CollectionChangeEvent<Property> e)
 {
     form.StartBulkUpdate();
     form.SetProperties(entity.ConcreteProperties);
     form.RefreshVirtualProperties();
     form.EndBulkUpdate();
 }
Exemple #20
0
 private void OnDatabaseTablesChanged(object s, CollectionChangeEvent <ITable> e)
 {
     TablesChanged.RaiseEvent(database, e);
 }
 private void Database_RelationshipsChanged(object sender, CollectionChangeEvent<Relationship> e)
 {
     switch (e.ChangeType)
     {
         case CollectionChangeAction.Addition:
             OnRelationshipAdded(e.ChangedObject);
             break;
         case CollectionChangeAction.Deletion:
             OnRelationshipRemoved(e.ChangedObject);
             break;
     }
 }
Exemple #22
0
 private void key_PropertiesChanged(object sender, CollectionChangeEvent <Property> args)
 {
     form.SetProperties(key.Properties);
     form.KeyType = key.KeyType;
 }
 void EntitySet_EntitiesChanged(object sender, CollectionChangeEvent<Entity> e)
 {
     switch (e.ChangeType)
     {
         case CollectionChangeAction.Addition:
             OnEntityAdded(e.ChangedObject);
             break;
         case CollectionChangeAction.Deletion:
             OnEntityRemoved(e.ChangedObject);
             break;
     }
 }
 private void key_PropertiesChanged(object sender, CollectionChangeEvent<Property> args)
 {
     form.SetProperties(key.Properties);
     form.KeyType = key.KeyType;
 }
 void entity_ChildrenChanged(object sender, CollectionChangeEvent<Entity> e)
 {
     switch (e.ChangeType)
     {
         case CollectionChangeAction.Addition:
             OnChildAdded(e.ChangedObject, sender as Entity);
             break;
         case CollectionChangeAction.Deletion:
             OnChildRemoved(e.ChangedObject, sender as Entity);
             break;
     }
 }
Exemple #26
0
 void entity_ChildrenChanged(object sender, CollectionChangeEvent <Entity> e)
 {
     EntityChildrenChanged.RaiseEvent(sender, e);
 }