Exemplo n.º 1
0
 /// <summary>
 ///     Update the property value within a transaction context
 /// </summary>
 /// <param name="updateCallback"></param>
 private void UpdatePropertyValue(UpdatePropertyValueCallback updatePropertyValueCallback, string txName)
 {
     try
     {
         PropertyWindowViewModelHelper.CreateCommandProcessorContext(_editingContext, txName);
         updatePropertyValueCallback();
     }
     finally
     {
         PropertyWindowViewModelHelper.RemoveCommandProcessorContext();
     }
 }
Exemplo n.º 2
0
        private void Reset()
        {
            Debug.Assert(_cpc != null, "CommandProcessorContext should have been created.");

            if (_cpc != null)
            {
                try
                {
                    _cpc.Artifact.XmlModelProvider.EndUndoScope();
                    _cpc.EditingContext.ParentUndoUnitStarted = false;
                }
                finally
                {
                    PropertyWindowViewModelHelper.RemoveCommandProcessorContext();
                    _cpc     = null;
                    _counter = 0;
                }
            }
        }