Ejemplo n.º 1
0
        private void EnsureProperActions(TriggerBaseNode trigger, StoryboardTimelineSceneNode storyboard)
        {
            if (!TriggersHelper.NeedsBeginAction(storyboard))
            {
                return;
            }
            TimelineActionNode timelineActionNode = (TimelineActionNode)BeginActionNode.Factory.Instantiate(storyboard.ViewModel);

            timelineActionNode.TargetTimeline = storyboard;
            TriggersHelper.DefaultAddAction(trigger, (TriggerActionNode)timelineActionNode);
            storyboard.UpdateActionNames();
        }
Ejemplo n.º 2
0
 protected override void Delete()
 {
     if (!this.SceneNode.IsAttached)
     {
         return;
     }
     if (!TriggersHelper.CanDeleteAction(this.TimelineAction))
     {
         this.SceneNode.ViewModel.DesignerContext.MessageDisplayService.ShowError(StringTable.TriggerDeleteBeginAction);
     }
     else
     {
         using (SceneEditTransaction editTransaction = this.SceneNode.ViewModel.CreateEditTransaction(StringTable.TriggerChangeUndoUnit))
         {
             StoryboardTimelineSceneNode targetTimeline = this.TimelineAction.TargetTimeline;
             this.SceneNode.Remove();
             targetTimeline.UpdateActionNames();
             editTransaction.Commit();
         }
     }
 }