src/Misc/EFTools/EntityDesignEntityDesigner/CustomCode/DomainClasses/EntityDesignerViewModel.cs
/// <summary>
///     This is our EventHandler which modifies the diagram view whenever the underlying Model changes.
///     Any undo/redo changes will be processed through this event.
/// </summary>
This is our EventHandler which modifies the diagram view whenever the underlying Model changes.
Any undo/redo changes will be processed through this event.
This is our EventHandler which modifies the diagram view whenever the underlying Model changes . Any undo / redo changes will be processed through this event .
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
        private void OnModelChangesCommitted(object sender, EfiChangedEventArgs e)
        {
            if (e.ChangeGroup.Transaction != null
                && e.ChangeGroup.Transaction.OriginatorId == EfiTransactionOriginator.MappingDetailsOriginatorId)
            {
                return;
            }
            if (RespondToModelChanges == false)
            {
                return;
            }
            ProcessModelChanges(e.ChangeGroup);
            if (e.ChangeGroup.Transaction != null
                && e.ChangeGroup.Transaction.OriginatorId == EfiTransactionOriginator.XmlEditorOriginatorId)
            {
                try
                {
                    _reloading = true;
                    MicrosoftDataEntityDesignSerializationHelper.ReloadDiagram(this);
                }
                catch (Exception)
                {
                }
                finally
                {
                    _reloading = false;
                }
            }
        }
[ SuppressMessage ( " " , " " ) ] private void OnModelChangesCommitted ( object sender , EfiChangedEventArgs e ) { if ( e . ChangeGroup . Transaction != null && e . ChangeGroup . Transaction . OriginatorId == EfiTransactionOriginator . MappingDetailsOriginatorId ) { return ; } if ( RespondToModelChanges == false ) { return ; } ProcessModelChanges ( e . ChangeGroup ) ; if ( e . ChangeGroup . Transaction != null && e . ChangeGroup . Transaction . OriginatorId == EfiTransactionOriginator . XmlEditorOriginatorId ) { try { _reloading = true ; MicrosoftDataEntityDesignSerializationHelper . ReloadDiagram ( this ) ; } catch ( Exception ) { } finally { _reloading = false ; } } }
This is our EventHandler which modifies the diagram view whenever the underlying Model changes.
This is our EventHandler which modifies the diagram view whenever the underlying Model changes .
// if its an edit from the mapping designer, there is nothing to process // if this transaction came from the Xml Editor, then the user is typing and // we are going to be creating and deleting lots of items, so just try and  // layout the shapes // no-op, at some point, they might have changed the file so much that we can't // lay things out anymore
sender
object
e
EfiChangedEventArgs