public void Dispose() { if (this.AnnotationService != null) { this.AnnotationService.ShowAnnotationsChanged -= new EventHandler(this.AnnotationService_ShowAnnotationsChanged); this.AnnotationService.AnnotationsEnabledChanged -= new EventHandler(this.AnnotationService_AnnotationsEnabledChanged); } this.sceneViewModel.LateSceneUpdatePhase -= new SceneUpdatePhaseEventHandler(this.SceneViewModel_LateSceneUpdatePhase); this.sceneViewModel.Document.EditTransactionCompleting -= new EventHandler(this.SceneDocument_EditTransactionCompleting); this.annotationSub.SetPathNodeInsertedHandler((SceneNodeSubscription <object, AnnotationEditor.AnnotationInfo> .PathNodeInsertedHandler)null); this.annotationSub.PathNodeInserted -= new SceneNodeSubscription <object, AnnotationEditor.AnnotationInfo> .PathNodeInsertedListener(this.Annotation_Inserted); this.annotationSub.PathNodeContentChanged -= new SceneNodeSubscription <object, AnnotationEditor.AnnotationInfo> .PathNodeContentChangedListener(this.Annotation_Changed); this.annotationSub.PathNodeRemoved -= new SceneNodeSubscription <object, AnnotationEditor.AnnotationInfo> .PathNodeRemovedListener(this.Annotation_Removed); this.annotationSub.CurrentViewModel = (SceneViewModel)null; this.annotationSub = (SceneNodeSubscription <object, AnnotationEditor.AnnotationInfo>)null; this.referenceSub.SetPathNodeInsertedHandler((SceneNodeSubscription <object, AnnotationEditor.ReferenceInfo> .PathNodeInsertedHandler)null); this.referenceSub.PathNodeInserted -= new SceneNodeSubscription <object, AnnotationEditor.ReferenceInfo> .PathNodeInsertedListener(this.References_Inserted); this.referenceSub.PathNodeContentChanged -= new SceneNodeSubscription <object, AnnotationEditor.ReferenceInfo> .PathNodeContentChangedListener(this.References_Changed); this.referenceSub.PathNodeRemoved -= new SceneNodeSubscription <object, AnnotationEditor.ReferenceInfo> .PathNodeRemovedListener(this.References_Removed); this.referenceSub.CurrentViewModel = (SceneViewModel)null; this.referenceSub = (SceneNodeSubscription <object, AnnotationEditor.ReferenceInfo>)null; GC.SuppressFinalize((object)this); }
protected override void Unsubscribe() { if (this.editingProperty != null) { this.editingProperty.PropertyReferenceChanged -= new Microsoft.Expression.DesignSurface.Documents.PropertyReferenceChangedEventHandler(((SketchFlowPickerEditor)this).EditingProperty_PropertyReferenceChanged); } if (this.targetScreenProperty != null) { this.targetScreenProperty.OnRemoveFromCategory(); this.targetScreenProperty.PropertyReferenceChanged -= new Microsoft.Expression.DesignSurface.Documents.PropertyReferenceChangedEventHandler(((SketchFlowPickerEditor)this).TargetScreenProperty_PropertyReferenceChanged); } if (this.subscription != null) { this.subscription.PathNodeInserted -= new SceneNodeSubscription <TItemNode, TItemNode> .PathNodeInsertedListener(((SketchFlowPickerEditor)this).Subscription_PathNodesChanged); this.subscription.PathNodeRemoved -= new SceneNodeSubscription <TItemNode, TItemNode> .PathNodeRemovedListener(((SketchFlowPickerEditor)this).Subscription_PathNodesChanged); this.subscription.PathNodeContentChanged -= new SceneNodeSubscription <TItemNode, TItemNode> .PathNodeContentChangedListener(((SketchFlowPickerEditor)this).Subscription_PathNodeContentChanged); this.subscription.Path = (SearchPath)null; } if (this.viewModel != null) { this.viewModel.LateSceneUpdatePhase -= new SceneUpdatePhaseEventHandler(this.ViewModel_LateSceneUpdatePhase); } this.editingProperty = (SceneNodeProperty)null; this.viewModel = (SceneViewModel)null; this.subscription = (SceneNodeSubscription <TItemNode, TItemNode>)null; this.targetScreenProperty = (SceneNodeProperty)null; }
public override void Initialize() { base.Initialize(); this.conditionSubscription = new SceneNodeSubscription <object, ConditionModel>(); this.conditionSubscription.Path = new SearchPath(new SearchStep[1] { new SearchStep(SearchAxis.DocumentDescendant, (ISearchPredicate) new SceneNodeTypePredicate(typeof(ITriggerConditionNode))) }); this.conditionSubscription.SetPathNodeInsertedHandler(new SceneNodeSubscription <object, ConditionModel> .PathNodeInsertedHandler(this.ConditionSubscription_Inserted)); this.conditionSubscription.PathNodeRemoved += new SceneNodeSubscription <object, ConditionModel> .PathNodeRemovedListener(this.ConditionSubscription_Removed); this.conditionSubscription.PathNodeContentChanged += new SceneNodeSubscription <object, ConditionModel> .PathNodeContentChangedListener(this.ConditionSubscription_ContentChanged); this.setterSubscription = new SceneNodeSubscription <object, SetterModel>(); this.setterSubscription.Path = new SearchPath(new SearchStep[1] { new SearchStep(SearchAxis.DocumentDescendant, (ISearchPredicate) new SceneNodeTypePredicate(typeof(SetterSceneNode)), (ISearchPredicate) new DelegatePredicate(new Predicate <SceneNode>(TriggerModelManager.IsNotStyleOrTemplate), SearchScope.NodeTreeSelf)) }); this.setterSubscription.SetPathNodeInsertedHandler(new SceneNodeSubscription <object, SetterModel> .PathNodeInsertedHandler(this.SetterSubscription_Inserted)); this.setterSubscription.PathNodeRemoved += new SceneNodeSubscription <object, SetterModel> .PathNodeRemovedListener(this.SetterSubscription_Removed); this.setterSubscription.PathNodeContentChanged += new SceneNodeSubscription <object, SetterModel> .PathNodeContentChangedListener(this.SetterSubscription_ContentChanged); List <SceneNode> list = new List <SceneNode>(1); list.Add((SceneNode)this.SceneNode); this.conditionSubscription.SetBasisNodes(this.SceneNode.ViewModel, (IEnumerable <SceneNode>)list); this.setterSubscription.SetBasisNodes(this.SceneNode.ViewModel, (IEnumerable <SceneNode>)list); if (this.baseTriggerNode is Microsoft.Expression.DesignSurface.ViewModel.TriggerNode) { this.AddCondition((ITriggerConditionNode)this.baseTriggerNode); } this.SortAfterUpdate(); }
public override void Initialize() { this.selectionManager = this.ViewModel.DesignerContext.SelectionManager; this.selectionManager.LateActiveSceneUpdatePhase += new SceneUpdatePhaseEventHandler(this.SelectionManager_LateActiveSceneUpdatePhase); this.setterSubscription = new SceneNodeSubscription <object, SetterModel>(); this.setterSubscription.Path = new SearchPath(new SearchStep[1] { new SearchStep(SearchAxis.DocumentDescendant, (ISearchPredicate) new SceneNodeTypePredicate(typeof(SetterSceneNode)), (ISearchPredicate) new DelegatePredicate((Predicate <SceneNode>)(obj => { if (!typeof(TriggerBase).IsAssignableFrom(obj.TargetType)) { return(TriggerModelManager.IsNotStyleOrTemplate(obj)); } return(false); }), SearchScope.NodeTreeSelf)) }); this.setterSubscription.SetPathNodeInsertedHandler(new SceneNodeSubscription <object, SetterModel> .PathNodeInsertedHandler(this.SetterSubscription_Inserted)); this.setterSubscription.PathNodeRemoved += new SceneNodeSubscription <object, SetterModel> .PathNodeRemovedListener(this.SetterSubscription_Removed); this.setterSubscription.PathNodeContentChanged += new SceneNodeSubscription <object, SetterModel> .PathNodeContentChangedListener(this.SetterSubscription_ContentChanged); this.setterSubscription.SetBasisNodes(this.ViewModel, (IEnumerable <SceneNode>) new List <SceneNode>(1) { this.activeEditingContainer }); this.SortAfterUpdate(); }
public AnnotationEditor(SceneViewModel sceneViewModel) { this.sceneViewModel = sceneViewModel; this.nullTool = new AnnotationEditor.NullTool(this.sceneViewModel.DesignerContext.ToolContext); if (this.AnnotationService != null) { this.AnnotationService.ShowAnnotationsChanged += new EventHandler(this.AnnotationService_ShowAnnotationsChanged); this.AnnotationService.AnnotationsEnabledChanged += new EventHandler(this.AnnotationService_AnnotationsEnabledChanged); } this.sceneViewModel.LateSceneUpdatePhase += new SceneUpdatePhaseEventHandler(this.SceneViewModel_LateSceneUpdatePhase); this.sceneViewModel.Document.EditTransactionCompleting += new EventHandler(this.SceneDocument_EditTransactionCompleting); this.annotationsSearchPath = new SearchPath(new SearchStep[1] { new SearchStep(SearchAxis.DocumentDescendant, (ISearchPredicate) new DelegatePredicate((Predicate <SceneNode>)(sceneNode => { if (sceneNode is AnnotationSceneNode) { return(sceneNode.Parent is SceneElement); } return(false); }), SearchScope.NodeTreeDescendant)) }); this.annotationSub = new SceneNodeSubscription <object, AnnotationEditor.AnnotationInfo>(); this.annotationSub.Path = this.annotationsSearchPath; this.annotationSub.SetPathNodeInsertedHandler(new SceneNodeSubscription <object, AnnotationEditor.AnnotationInfo> .PathNodeInsertedHandler(this.Annotation_InsertedHandler)); this.annotationSub.PathNodeInserted += new SceneNodeSubscription <object, AnnotationEditor.AnnotationInfo> .PathNodeInsertedListener(this.Annotation_Inserted); this.annotationSub.PathNodeContentChanged += new SceneNodeSubscription <object, AnnotationEditor.AnnotationInfo> .PathNodeContentChangedListener(this.Annotation_Changed); this.annotationSub.PathNodeRemoved += new SceneNodeSubscription <object, AnnotationEditor.AnnotationInfo> .PathNodeRemovedListener(this.Annotation_Removed); this.annotationSub.CurrentViewModel = (SceneViewModel)null; IProperty annotationReferencesProperty = this.sceneViewModel.ProjectContext.ResolveProperty(AnnotationSceneNode.ReferencesProperty); this.referenceSub = new SceneNodeSubscription <object, AnnotationEditor.ReferenceInfo>(); this.referenceSub.Path = new SearchPath(new SearchStep[1] { new SearchStep(SearchAxis.DocumentDescendant, (ISearchPredicate) new DelegatePredicate((Predicate <SceneNode>)(sceneNode => { if (sceneNode.DocumentNode.IsProperty) { return(sceneNode.DocumentNode.SitePropertyKey == annotationReferencesProperty); } return(false); }), SearchScope.NodeTreeDescendant)) }); this.referenceSub.SetPathNodeInsertedHandler(new SceneNodeSubscription <object, AnnotationEditor.ReferenceInfo> .PathNodeInsertedHandler(this.References_InsertedHandler)); this.referenceSub.PathNodeInserted += new SceneNodeSubscription <object, AnnotationEditor.ReferenceInfo> .PathNodeInsertedListener(this.References_Inserted); this.referenceSub.PathNodeContentChanged += new SceneNodeSubscription <object, AnnotationEditor.ReferenceInfo> .PathNodeContentChangedListener(this.References_Changed); this.referenceSub.PathNodeRemoved += new SceneNodeSubscription <object, AnnotationEditor.ReferenceInfo> .PathNodeRemovedListener(this.References_Removed); this.referenceSub.CurrentViewModel = (SceneViewModel)null; }
internal void Unload() { this.viewModel.LateSceneUpdatePhase -= new SceneUpdatePhaseEventHandler(this.SelectionManager_LateActiveSceneUpdatePhase); this.elementSubscription.SetPathNodeInsertedHandler((SceneNodeSubscription <object, object> .PathNodeInsertedHandler)null); this.elementSubscription.PathNodeRemoved -= new SceneNodeSubscription <object, object> .PathNodeRemovedListener(this.ElementSubscription_ElementRemoved); this.elementSubscription.PathNodeContentChanged -= new SceneNodeSubscription <object, object> .PathNodeContentChangedListener(this.ElementSubscription_ElementContentChanged); this.elementSubscription.CurrentViewModel = (SceneViewModel)null; this.elementSubscription = (SceneNodeSubscription <object, object>)null; }
public XamlSceneSubscription(SceneViewModel viewModel, XamlProjectSubscription parentXamlSubscription, SearchPath searchPath) : base(parentXamlSubscription) { this.viewModel = viewModel; this.subscription = new SceneNodeSubscription <SceneNode, SceneNode>(); this.subscription.Path = searchPath; this.subscription.PathNodeInserted += new SceneNodeSubscription <SceneNode, SceneNode> .PathNodeInsertedListener(this.Subscription_PathNodeInserted); this.subscription.PathNodeRemoved += new SceneNodeSubscription <SceneNode, SceneNode> .PathNodeRemovedListener(this.Subscription_PathNodeRemoved); this.viewModel.LateSceneUpdatePhase += new SceneUpdatePhaseEventHandler(this.ViewModel_LateSceneUpdatePhase); }
internal EventsModel(DesignerContext designerContext) { this.designerContext = designerContext; this.designerContext.ViewService.ActiveViewChanged += new ViewChangedEventHandler(this.ViewService_ActiveViewChanged); this.designerContext.SelectionManager.LateActiveSceneUpdatePhase += new SceneUpdatePhaseEventHandler(this.SelectionManager_LateActiveSceneUpdatePhase); this.eventSubscription = new SceneNodeSubscription <object, EventHandlerModel>(); this.eventSubscription.Path = new SearchPath(new SearchStep[1] { new SearchStep(SearchAxis.DocumentChild, (ISearchPredicate) new DelegatePredicate((Predicate <SceneNode>)(obj => obj.DocumentNode.IsProperty && typeof(Delegate).IsAssignableFrom(PlatformTypeHelper.GetPropertyType(obj.DocumentNode.SitePropertyKey))), SearchScope.NodeTreeSelf), (ISearchPredicate) new TargetTypePredicate(PlatformTypes.Delegate)) }); this.Attach(); }
public void Dispose() { if (this.subscription != null) { this.subscription.PathNodeInserted -= new SceneNodeSubscription <SceneNode, SceneNode> .PathNodeInsertedListener(this.Subscription_PathNodeInserted); this.subscription.PathNodeRemoved -= new SceneNodeSubscription <SceneNode, SceneNode> .PathNodeRemovedListener(this.Subscription_PathNodeRemoved); this.subscription.CurrentViewModel = (SceneViewModel)null; this.subscription = (SceneNodeSubscription <SceneNode, SceneNode>)null; } this.viewModel.LateSceneUpdatePhase -= new SceneUpdatePhaseEventHandler(this.ViewModel_LateSceneUpdatePhase); }
public void Unload() { if (this.subscription == null) { return; } this.subscription.PathNodeInserted -= new SceneNodeSubscription <object, object> .PathNodeInsertedListener(this.Subscription_PathNodeInserted); this.subscription.PathNodeRemoved -= new SceneNodeSubscription <object, object> .PathNodeRemovedListener(this.Subscription_PathNodeRemoved); this.sceneNode.ViewModel.LateSceneUpdatePhase -= new SceneUpdatePhaseEventHandler(this.ViewModel_LateSceneUpdatePhase); this.subscription = (SceneNodeSubscription <object, object>)null; }
public virtual void Detach() { if (this.actionSubscription == null) { return; } this.actionSubscription.PathNodeRemoved -= new SceneNodeSubscription <object, TriggerActionModel> .PathNodeRemovedListener(this.ActionSubscription_Removed); this.actionSubscription.PathNodeContentChanged -= new SceneNodeSubscription <object, TriggerActionModel> .PathNodeContentChangedListener(this.ActionSubscription_ContentChanged); this.actionSubscription.CurrentViewModel = (SceneViewModel)null; this.actionSubscription = (SceneNodeSubscription <object, TriggerActionModel>)null; }
private void InitializeSubscription() { this.subscription = new SceneNodeSubscription <object, object>(); this.subscription.Path = new SearchPath(new SearchStep[1] { new SearchStep(new SearchAxis(this.sceneNode.NameProperty)) }); this.subscription.InsertBasisNode(this.sceneNode); this.subscription.PathNodeInserted += new SceneNodeSubscription <object, object> .PathNodeInsertedListener(this.Subscription_PathNodeInserted); this.subscription.PathNodeRemoved += new SceneNodeSubscription <object, object> .PathNodeRemovedListener(this.Subscription_PathNodeRemoved); this.sceneNode.ViewModel.LateSceneUpdatePhase += new SceneUpdatePhaseEventHandler(this.ViewModel_LateSceneUpdatePhase); }
private void Initialize() { this.viewModel.LateSceneUpdatePhase += new SceneUpdatePhaseEventHandler(this.SelectionManager_LateActiveSceneUpdatePhase); this.elementSubscription = new SceneNodeSubscription <object, object>(); this.elementSubscription.Path = new SearchPath(new SearchStep[2] { new SearchStep(SearchAxis.DocumentSelfAndDescendant, (ISearchPredicate) new SceneNodeTypePredicate(typeof(SceneNode))), new SearchStep(SearchAxis.DocumentChild, (ISearchPredicate) new DelegatePredicate((Predicate <SceneNode>)(node => !string.IsNullOrEmpty(node.Name)), SearchScope.NodeTreeSelf)) }); this.elementSubscription.SetPathNodeInsertedHandler(new SceneNodeSubscription <object, object> .PathNodeInsertedHandler(this.ElementSubscription_ElementInserted)); this.elementSubscription.PathNodeRemoved += new SceneNodeSubscription <object, object> .PathNodeRemovedListener(this.ElementSubscription_ElementRemoved); this.elementSubscription.PathNodeContentChanged += new SceneNodeSubscription <object, object> .PathNodeContentChangedListener(this.ElementSubscription_ElementContentChanged); }
private void InitCommon(DesignerContext designerContext) { this.designerContext = designerContext; this.resourceSubscription = new SceneNodeSubscription <object, object>(); this.resourceSubscription.Path = new SearchPath(new SearchStep[1] { new SearchStep((SearchAxis) new DelegateAxis(new DelegateAxis.EnumerationHandler(ResourceDictionaryContentProvider.ResourceEntryEnumerator), SearchScope.NodeTreeSelf)) }); this.resourceSubscription.PathNodeInserted += new SceneNodeSubscription <object, object> .PathNodeInsertedListener(this.ResourcesSubscription_PathNodeInserted); this.resourceSubscription.PathNodeRemoved += new SceneNodeSubscription <object, object> .PathNodeRemovedListener(this.ResourcesSubscription_PathNodeRemoved); this.resourceSubscription.PathNodeContentChanged += new SceneNodeSubscription <object, object> .PathNodeContentChangedListener(this.ResourcesSubscription_PathNodeChanged); }
protected override void Dispose(bool fromDispose) { base.Dispose(fromDispose); if (this.basisSubscription == null) { return; } this.basisSubscription.PathNodeInserted -= new SceneNodeSubscription <PathElement, PathGeometry> .PathNodeInsertedListener(((PathEditorTarget)this).OnBasisSubscriptionPathNodeInserted); this.basisSubscription.PathNodeRemoved -= new SceneNodeSubscription <PathElement, PathGeometry> .PathNodeRemovedListener(this.OnBasisSubscriptionPathNodeRemoved); this.basisSubscription.CurrentViewModel = (SceneViewModel)null; this.basisSubscription = (SceneNodeSubscription <PathElement, PathGeometry>)null; }
public ScenePathEditorTarget(PathElement pathElement) : base(pathElement.ViewModel, PathElement.DataProperty, (SceneNode)pathElement) { this.pathElement = pathElement; this.basisSubscription = new SceneNodeSubscription <PathElement, PathGeometry>(); this.basisSubscription.Path = new SearchPath(new SearchStep[1] { new SearchStep(new SearchAxis((IPropertyId)pathElement.ProjectContext.ResolveProperty(PathElement.DataProperty))) }); this.basisSubscription.InsertBasisNode((SceneNode)pathElement); this.basisSubscription.PathNodeInserted += new SceneNodeSubscription <PathElement, PathGeometry> .PathNodeInsertedListener(((PathEditorTarget)this).OnBasisSubscriptionPathNodeInserted); this.basisSubscription.PathNodeRemoved += new SceneNodeSubscription <PathElement, PathGeometry> .PathNodeRemovedListener(((PathEditorTarget)this).OnBasisSubscriptionPathNodeInserted); this.UpdateCachedPath(); }
protected override void Dispose(bool fromDispose) { base.Dispose(fromDispose); if (this.animationSubscription == null) { return; } this.animationSubscription.PathNodeInserted -= new SceneNodeSubscription <PathElement, PointKeyFrame> .PathNodeInsertedListener(this.OnAnimationBasisSubscriptionPathNodeChanged); this.animationSubscription.PathNodeRemoved -= new SceneNodeSubscription <PathElement, PointKeyFrame> .PathNodeRemovedListener(this.OnAnimationBasisSubscriptionPathNodeChanged); this.animationSubscription.PathNodeContentChanged -= new SceneNodeSubscription <PathElement, PointKeyFrame> .PathNodeContentChangedListener(this.animationSubscription_PathNodeContentChanged); this.animationSubscription.CurrentViewModel = (SceneViewModel)null; this.animationSubscription = (SceneNodeSubscription <PathElement, PointKeyFrame>)null; }
public virtual void Initialize() { this.deleteCommand = new DelegateCommand(new DelegateCommand.SimpleEventHandler(this.Delete)); this.actionSubscription = new SceneNodeSubscription <object, TriggerActionModel>(); this.actionSubscription.Path = new SearchPath(new SearchStep[1] { new SearchStep(SearchAxis.DocumentDescendant, (ISearchPredicate) new TargetTypePredicate(PlatformTypes.TriggerAction)) }); this.actionSubscription.SetPathNodeInsertedHandler(new SceneNodeSubscription <object, TriggerActionModel> .PathNodeInsertedHandler(this.ActionSubscription_Inserted)); this.actionSubscription.PathNodeRemoved += new SceneNodeSubscription <object, TriggerActionModel> .PathNodeRemovedListener(this.ActionSubscription_Removed); this.actionSubscription.PathNodeContentChanged += new SceneNodeSubscription <object, TriggerActionModel> .PathNodeContentChangedListener(this.ActionSubscription_ContentChanged); this.actionSubscription.SetBasisNodes(this.SceneNode.ViewModel, (IEnumerable <Microsoft.Expression.DesignSurface.ViewModel.SceneNode>) new List <Microsoft.Expression.DesignSurface.ViewModel.SceneNode>(1) { (Microsoft.Expression.DesignSurface.ViewModel.SceneNode) this.SceneNode }); }
public ClippingPathEditorTarget(Base2DElement editingElement) : base(editingElement.ViewModel, Base2DElement.ClipProperty, (SceneNode)editingElement) { this.editingElement = editingElement; IPropertyId propertyKey = (IPropertyId)editingElement.ProjectContext.ResolveProperty(Base2DElement.ClipProperty); this.basisSubscription = new SceneNodeSubscription <PathElement, PathGeometry>(); this.basisSubscription.Path = new SearchPath(new SearchStep[1] { new SearchStep(new SearchAxis(propertyKey)) }); this.basisSubscription.InsertBasisNode((SceneNode)editingElement); this.basisSubscription.PathNodeInserted += new SceneNodeSubscription <PathElement, PathGeometry> .PathNodeInsertedListener(((PathEditorTarget)this).OnBasisSubscriptionPathNodeInserted); this.basisSubscription.PathNodeRemoved += new SceneNodeSubscription <PathElement, PathGeometry> .PathNodeRemovedListener(this.OnBasisSubscriptionPathNodeRemoved); this.UpdateCachedPath(); }
protected override void Subscribe(SceneNodeProperty editingProperty) { this.editingProperty = editingProperty; this.viewModel = editingProperty.SceneNodeObjectSet.ViewModel; this.viewModel.LateSceneUpdatePhase += new SceneUpdatePhaseEventHandler(this.ViewModel_LateSceneUpdatePhase); this.subscription = this.CreateSubscription(); this.subscription.PathNodeInserted += new SceneNodeSubscription <TItemNode, TItemNode> .PathNodeInsertedListener(((SketchFlowPickerEditor)this).Subscription_PathNodesChanged); this.subscription.PathNodeRemoved += new SceneNodeSubscription <TItemNode, TItemNode> .PathNodeRemovedListener(((SketchFlowPickerEditor)this).Subscription_PathNodesChanged); this.subscription.PathNodeContentChanged += new SceneNodeSubscription <TItemNode, TItemNode> .PathNodeContentChangedListener(((SketchFlowPickerEditor)this).Subscription_PathNodeContentChanged); this.subscription.SetSceneRootNodeAsTheBasisNode(editingProperty.SceneNodeObjectSet.ViewModel); ReferenceStep singleStep = (ReferenceStep)editingProperty.SceneNodeObjectSet.ProjectContext.ResolveProperty(this.TargetScreenProperty); this.targetScreenProperty = (SceneNodeProperty)editingProperty.SceneNodeObjectSet.CreateProperty(new PropertyReference(singleStep), (AttributeCollection)null); this.targetScreenProperty.PropertyReferenceChanged += new Microsoft.Expression.DesignSurface.Documents.PropertyReferenceChangedEventHandler(((SketchFlowPickerEditor)this).TargetScreenProperty_PropertyReferenceChanged); this.editingProperty.PropertyReferenceChanged += new Microsoft.Expression.DesignSurface.Documents.PropertyReferenceChangedEventHandler(((SketchFlowPickerEditor)this).EditingProperty_PropertyReferenceChanged); }
public override void Detach() { base.Detach(); if (this.selectionManager != null) { this.selectionManager.LateActiveSceneUpdatePhase -= new SceneUpdatePhaseEventHandler(this.SelectionManager_LateActiveSceneUpdatePhase); this.selectionManager = (SelectionManager)null; } if (this.setterSubscription == null) { return; } this.setterSubscription.PathNodeRemoved -= new SceneNodeSubscription <object, SetterModel> .PathNodeRemovedListener(this.SetterSubscription_Removed); this.setterSubscription.PathNodeContentChanged -= new SceneNodeSubscription <object, SetterModel> .PathNodeContentChangedListener(this.SetterSubscription_ContentChanged); this.setterSubscription.CurrentViewModel = (SceneViewModel)null; this.setterSubscription = (SceneNodeSubscription <object, SetterModel>)null; }
protected AnimatablePathEditorTarget(SceneViewModel viewModel, IPropertyId animatedProperty, SceneNode animatedElement) : base(viewModel) { IPropertyId animationRoot = (IPropertyId)viewModel.ProjectContext.ResolveProperty(animatedProperty); this.animationSubscription = new SceneNodeSubscription <PathElement, PointKeyFrame>(); this.animationSubscription.Path = new SearchPath(new SearchStep[3] { new SearchStep(SearchAxis.ActiveStoryboard), new SearchStep(SearchAxis.Animations, (ISearchPredicate) new AnimationTargetPredicate(animatedElement, animationRoot)), new SearchStep(SearchAxis.KeyFrames) }); this.animationSubscription.InsertBasisNode(animatedElement); this.animationSubscription.PathNodeInserted += new SceneNodeSubscription <PathElement, PointKeyFrame> .PathNodeInsertedListener(this.OnAnimationBasisSubscriptionPathNodeChanged); this.animationSubscription.PathNodeRemoved += new SceneNodeSubscription <PathElement, PointKeyFrame> .PathNodeRemovedListener(this.OnAnimationBasisSubscriptionPathNodeChanged); this.animationSubscription.PathNodeContentChanged += new SceneNodeSubscription <PathElement, PointKeyFrame> .PathNodeContentChangedListener(this.animationSubscription_PathNodeContentChanged); }
public void Initialize() { this.designerContext.SelectionManager.EarlyActiveSceneUpdatePhase += new SceneUpdatePhaseEventHandler(this.SelectionManager_EarlyActiveSceneUpdatePhase); this.designerContext.SelectionManager.LateActiveSceneUpdatePhase += new SceneUpdatePhaseEventHandler(this.SelectionManager_LateActiveSceneUpdatePhase); this.addTriggerCommand = new DelegateCommand(new DelegateCommand.SimpleEventHandler(this.CreateNewEventTrigger)); this.addPropertyTriggerCommand = new DelegateCommand(new DelegateCommand.SimpleEventHandler(this.CreateNewPropertyTrigger)); this.deleteTriggerCommand = new DelegateCommand(new DelegateCommand.SimpleEventHandler(this.DeleteTrigger)); this.UpdateDeleteTrigger(); this.triggerSubscription = new SceneNodeSubscription <object, TriggerModel3>(); this.triggerSubscription.Path = new SearchPath(new SearchStep[1] { new SearchStep(SearchAxis.DocumentDescendant, (ISearchPredicate) new TargetTypePredicate(PlatformTypes.TriggerBase), (ISearchPredicate) new DelegatePredicate(new Predicate <SceneNode>(TriggerModelManager.IsNotStyleOrTemplate), SearchScope.NodeTreeSelf)) }); this.triggerSubscription.SetPathNodeInsertedHandler(new SceneNodeSubscription <object, TriggerModel3> .PathNodeInsertedHandler(this.TriggerSubscription_Inserted)); this.triggerSubscription.PathNodeRemoved += new SceneNodeSubscription <object, TriggerModel3> .PathNodeRemovedListener(this.TriggerSubscription_Removed); this.triggerSubscription.PathNodeContentChanged += new SceneNodeSubscription <object, TriggerModel3> .PathNodeContentChangedListener(this.TriggerSubscription_ContentChanged); this.UpdateFromEditingContainerChange(true); }
public override void Detach() { base.Detach(); if (this.setterSubscription != null) { this.setterSubscription.PathNodeRemoved -= new SceneNodeSubscription <object, SetterModel> .PathNodeRemovedListener(this.SetterSubscription_Removed); this.setterSubscription.PathNodeContentChanged -= new SceneNodeSubscription <object, SetterModel> .PathNodeContentChangedListener(this.SetterSubscription_ContentChanged); this.setterSubscription.CurrentViewModel = (SceneViewModel)null; this.setterSubscription = (SceneNodeSubscription <object, SetterModel>)null; } if (this.conditionSubscription == null) { return; } this.conditionSubscription.PathNodeRemoved -= new SceneNodeSubscription <object, ConditionModel> .PathNodeRemovedListener(this.ConditionSubscription_Removed); this.conditionSubscription.PathNodeContentChanged -= new SceneNodeSubscription <object, ConditionModel> .PathNodeContentChangedListener(this.ConditionSubscription_ContentChanged); this.conditionSubscription.CurrentViewModel = (SceneViewModel)null; this.conditionSubscription = (SceneNodeSubscription <object, ConditionModel>)null; }