///-------------------------------------------------------------------------------- /// <summary>This method updates the view model data and sends update command back /// to the solution builder.</summary> ///-------------------------------------------------------------------------------- protected override void OnUpdate() { // set up reverse engineering instance if not present if (ViewProperty.ReverseInstance == null && ViewProperty.IsAutoUpdated == true) { ViewProperty.ReverseInstance = new ViewProperty(); ViewProperty.ReverseInstance.TransformDataFromObject(ViewProperty, null, false); // perform the update of EditViewProperty back to ViewProperty ViewProperty.TransformDataFromObject(EditViewProperty, null, false); ViewProperty.IsAutoUpdated = false; } else if (ViewProperty.ReverseInstance != null) { EditViewProperty.ResetModified(ViewProperty.ReverseInstance.IsModified); if (EditViewProperty.Equals(ViewProperty.ReverseInstance)) { // perform the update of EditViewProperty back to ViewProperty ViewProperty.TransformDataFromObject(EditViewProperty, null, false); ViewProperty.IsAutoUpdated = true; } else { // perform the update of EditViewProperty back to ViewProperty ViewProperty.TransformDataFromObject(EditViewProperty, null, false); ViewProperty.IsAutoUpdated = false; } } else { // perform the update of EditViewProperty back to ViewProperty ViewProperty.TransformDataFromObject(EditViewProperty, null, false); ViewProperty.IsAutoUpdated = false; } ViewProperty.ForwardInstance = null; if (PropertyIDCustomized || OrderCustomized || DescriptionCustomized || TagsCustomized) { ViewProperty.ForwardInstance = new ViewProperty(); ViewProperty.ForwardInstance.ViewPropertyID = EditViewProperty.ViewPropertyID; ViewProperty.SpecSourceName = ViewProperty.DefaultSourceName; if (PropertyIDCustomized) { ViewProperty.ForwardInstance.PropertyID = EditViewProperty.PropertyID; } if (OrderCustomized) { ViewProperty.ForwardInstance.Order = EditViewProperty.Order; } if (DescriptionCustomized) { ViewProperty.ForwardInstance.Description = EditViewProperty.Description; } if (TagsCustomized) { ViewProperty.ForwardInstance.Tags = EditViewProperty.Tags; } } EditViewProperty.ResetModified(false); OnUpdated(this, null); // send update back to solution builder SendEditViewPropertyPerformed(); }