src/Misc/EFTools/EntityDesign/UI/Views/MappingDetails/MappingDetailsWindow.cs
// <summary>
//     This is our handler to watch for model changes
// </summary>
This is our handler to watch for model changes
This is our handler to watch for model changes
private void OnModelChangesCommitted(object sender, EfiChangedEventArgs e)
        {
            if (e.ChangeGroup.Transaction.OriginatorId != EfiTransactionOriginator.MappingDetailsOriginatorId)
            {
                if (Context != null)
                {
                    var selection = Context.Items.GetValue<MappingDetailsSelection>();
                    RefreshCurrentSelection();
                    if (e.ChangeGroup.Transaction.OriginatorId == EfiTransactionOriginator.PropertyWindowOriginatorId
                        &&
                        selection != null)
                    {
                        Context.Items.SetValue(selection);
                    }
                }
                else
                {
                    InitializeView();
                }
            }
        }
private void OnModelChangesCommitted ( object sender , EfiChangedEventArgs e ) { if ( e . ChangeGroup . Transaction . OriginatorId != EfiTransactionOriginator . MappingDetailsOriginatorId ) { if ( Context != null ) { var selection = Context . Items . GetValue < MappingDetailsSelection > ( ) ; RefreshCurrentSelection ( ) ; if ( e . ChangeGroup . Transaction . OriginatorId == EfiTransactionOriginator . PropertyWindowOriginatorId && selection != null ) { Context . Items . SetValue ( selection ) ; } } else { InitializeView ( ) ; } } }
This is our handler to watch for model changes
This is our handler to watch for model changes
// if the change originated from Property Window we need to restore previuos selection // otherwise the Property Window will become empty
sender
object
e
EfiChangedEventArgs