public TooltipsLabSettingsDialogBox(MsoAutoShapeType selectedShapeType, MsoAnimEffect selectedAnimType) { lastSelectedShapeType = selectedShapeType; lastSelectedAnimType = selectedAnimType; InitializeComponent(); Initialize(); }
public Effect AddShapeAsLastAutoplaying(Shape shape, MsoAnimEffect effect) { Effect addedEffect = _slide.TimeLine.MainSequence.AddEffect(shape, effect, MsoAnimateByLevel.msoAnimateLevelNone, MsoAnimTriggerType.msoAnimTriggerWithPrevious); return(addedEffect); }
public Effect SetShapeAsClickTriggered(Shape shape, int clickNumber, MsoAnimEffect effect) { Effect addedEffect; Sequence mainSequence = _slide.TimeLine.MainSequence; Effect nextClickEffect = mainSequence.FindFirstAnimationForClick(clickNumber + 1); Effect previousClickEffect = mainSequence.FindFirstAnimationForClick(clickNumber); bool hasClicksAfter = nextClickEffect != null; bool hasClickBefore = previousClickEffect != null; if (hasClicksAfter) { addedEffect = InsertAnimationBeforeExisting(shape, nextClickEffect, effect); } else if (hasClickBefore) { addedEffect = AddShapeAsLastAutoplaying(shape, effect); } else { addedEffect = mainSequence.AddEffect(shape, effect); } return(addedEffect); }
private Effect InsertAnimationAtIndex(Shape shape, int index, MsoAnimEffect animationEffect, MsoAnimTriggerType triggerType) { var animationSequence = _slide.TimeLine.MainSequence; Effect effect = animationSequence.AddEffect(shape, animationEffect, MsoAnimateByLevel.msoAnimateLevelNone, triggerType); effect.MoveTo(index); return(effect); }
public TooltipsLabSettingsAnimationEntry(MsoAnimEffect defaultEffectType, Bitmap image) { InitializeComponent(); Type = defaultEffectType; imageBox.Source = Imaging.CreateBitmapSourceFromHBitmap( image.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromWidthAndHeight(50, 50)); }
/// <summary> /// Append animation for `shape` with effect type `effectType` to `slide` /// </summary> /// <param name="slide"></param> /// <param name="shape"></param> /// <param name="effectType">specifies the type for the generated animation effect</param> /// <param name="clickNo">the clickNo in which the specified effect should appear</param> /// <returns></returns> public static Effect AppendAnimationToSlide(PowerPointSlide slide, Shape shape, MsoAnimEffect effectType, int clickNo) { Effect effect = slide.SetShapeAsClickTriggered(shape, clickNo, effectType); if (StringUtility.ExtractFunctionFromString(shape.Name).Equals(ELearningLabText.CalloutIdentifier)) { effect.EffectType = MsoAnimEffect.msoAnimEffectFade; } return(effect); }
private Effect InsertAnimationBeforeExisting(Shape shape, Effect existing, MsoAnimEffect effect) { var sequence = _slide.TimeLine.MainSequence; Effect newAnimation = sequence.AddEffect(shape, effect, MsoAnimateByLevel.msoAnimateLevelNone, MsoAnimTriggerType.msoAnimTriggerWithPrevious); newAnimation.MoveBefore(existing); return(newAnimation); }
public TooltipsLabSettingsAnimationEntry(MsoAnimEffect defaultEffectType, Bitmap image) { InitializeComponent(); Type = defaultEffectType; imageBox.Source = GraphicsUtil.BitmapToImageSource(image); }
public Effect SetShapeAsClickTriggered(Shape shape, int clickNumber, MsoAnimEffect effect) { Effect addedEffect; Sequence mainSequence = _slide.TimeLine.MainSequence; Effect nextClickEffect = mainSequence.FindFirstAnimationForClick(clickNumber + 1); Effect previousClickEffect = mainSequence.FindFirstAnimationForClick(clickNumber); bool hasClicksAfter = nextClickEffect != null; bool hasClickBefore = previousClickEffect != null; if (hasClicksAfter) { addedEffect = InsertAnimationBeforeExisting(shape, nextClickEffect, effect); } else if (hasClickBefore) { addedEffect = AddShapeAsLastAutoplaying(shape, effect); } else { addedEffect = mainSequence.AddEffect(shape, effect); } return addedEffect; }
private Effect InsertAnimationBeforeExisting(Shape shape, Effect existing, MsoAnimEffect effect) { var sequence = _slide.TimeLine.MainSequence; Effect newAnimation = sequence.AddEffect(shape, effect, MsoAnimateByLevel.msoAnimateLevelNone, MsoAnimTriggerType.msoAnimTriggerWithPrevious); newAnimation.MoveBefore(existing); return newAnimation; }
private Effect InsertAnimationAtIndex(Shape shape, int index, MsoAnimEffect animationEffect, MsoAnimTriggerType triggerType) { var animationSequence = _slide.TimeLine.MainSequence; Effect effect = animationSequence.AddEffect(shape, animationEffect, MsoAnimateByLevel.msoAnimateLevelNone, triggerType); effect.MoveTo(index); return effect; }
public Effect AddTriggerEffect(Shape pShape, MsoAnimEffect effectId, MsoAnimTriggerType trigger, Shape pTriggerShape, string bookmark = "", MsoAnimateByLevel Level = MsoAnimateByLevel.msoAnimateLevelNone) { throw new NotImplementedException(); }
private static void AddTriggerEffect(Shape triggerShape, List <Shape> shapesToAnimate, MsoAnimEffect effect, Sequence sequence) { // Add Entrance Effect for (int i = 0; i < shapesToAnimate.Count; i++) { Shape animationShape = shapesToAnimate[i]; MsoAnimTriggerType triggerType; // The first shape will be triggered by the click to appear if (i == 0) { triggerType = MsoAnimTriggerType.msoAnimTriggerOnShapeClick; sequence.AddTriggerEffect(animationShape, effect, triggerType, triggerShape); } // Rest of the shapes will appear with the first shape else { triggerType = MsoAnimTriggerType.msoAnimTriggerWithPrevious; sequence.AddEffect(shapesToAnimate[i], effect, MsoAnimateByLevel.msoAnimateLevelNone, MsoAnimTriggerType.msoAnimTriggerWithPrevious); } } // Add Exit Effect to Shapes for (int i = 0; i < shapesToAnimate.Count; i++) { Shape animationShape = shapesToAnimate[i]; MsoAnimTriggerType triggerType; Effect effectInSequence; // The first shape will be triggered by the click to disappear if (i == 0) { triggerType = MsoAnimTriggerType.msoAnimTriggerOnShapeClick; effectInSequence = sequence.AddTriggerEffect(animationShape, effect, triggerType, triggerShape); } // Rest of the shapes will disappear with the first shape else { triggerType = MsoAnimTriggerType.msoAnimTriggerWithPrevious; effectInSequence = sequence.AddEffect(shapesToAnimate[i], effect, MsoAnimateByLevel.msoAnimateLevelNone, MsoAnimTriggerType.msoAnimTriggerWithPrevious); } effectInSequence.Exit = Microsoft.Office.Core.MsoTriState.msoTrue; } }
public Effect AddEffect(Shape Shape, MsoAnimEffect effectId, MsoAnimateByLevel Level = MsoAnimateByLevel.msoAnimateLevelNone, MsoAnimTriggerType trigger = MsoAnimTriggerType.msoAnimTriggerOnPageClick, int Index = -1) { throw new NotImplementedException(); }
private static void OnSettingsDialogConfirmed(MsoAutoShapeType newShapeType, MsoAnimEffect newAnimationType) { ShapeType = newShapeType; AnimationType = newAnimationType; }
public Effect AddShapeAsLastAutoplaying(Shape shape, MsoAnimEffect effect) { Effect addedEffect = _slide.TimeLine.MainSequence.AddEffect(shape, effect, MsoAnimateByLevel.msoAnimateLevelNone, MsoAnimTriggerType.msoAnimTriggerWithPrevious); return addedEffect; }