protected override void ModifyValue(PropertyReference propertyReference, object valueToSet, SceneNode.Modification modification, int index) { base.ModifyValue(propertyReference, valueToSet, modification, index); if (!this.IsInDocument) { return; } SceneNode sourceNode = (SceneNode)null; bool flag = this.IsSet(BehaviorEventTriggerBaseNode.BehaviorSourceObjectProperty) == PropertyState.Set; int num = (int)this.IsSet(BehaviorEventTriggerBaseNode.BehaviorSourceNameProperty); if (propertyReference.LastStep.Equals((object)BehaviorEventTriggerBaseNode.BehaviorSourceObjectProperty)) { this.ViewModel.Document.OnUpdatedEditTransaction(); if (modification == SceneNode.Modification.SetValue) { sourceNode = this.ViewModel.CreateSceneNode(this.GetComputedValue(propertyReference)); } else if (modification == SceneNode.Modification.ClearValue) { sourceNode = BehaviorHelper.FindNamedElement((SceneNode)this, this.SourceName); } } else if (!flag && propertyReference.LastStep.Equals((object)BehaviorEventTriggerBaseNode.BehaviorSourceNameProperty)) { sourceNode = BehaviorHelper.FindNamedElement((SceneNode)this, valueToSet as string); } BehaviorEventTriggerNode.FixUpEventNameImpl(this, sourceNode); }
internal static void FixUpEventName(BehaviorEventTriggerNode eventTriggerNode) { eventTriggerNode.ViewModel.Document.OnUpdatedEditTransaction(); BehaviorEventTriggerNode.FixUpEventNameImpl(eventTriggerNode, eventTriggerNode.SourceNode); }