當前位置: 首頁>>代碼示例>>C#>>正文


C# PowerPointSlide.GetNativeSlide方法代碼示例

本文整理匯總了C#中PowerPointLabs.Models.PowerPointSlide.GetNativeSlide方法的典型用法代碼示例。如果您正苦於以下問題:C# PowerPointSlide.GetNativeSlide方法的具體用法?C# PowerPointSlide.GetNativeSlide怎麽用?C# PowerPointSlide.GetNativeSlide使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PowerPointLabs.Models.PowerPointSlide的用法示例。


在下文中一共展示了PowerPointSlide.GetNativeSlide方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AddAppearAnimation

        private static void AddAppearAnimation(Shape shape, PowerPointSlide inSlide, int effectStartIndex)
        {
            if (inSlide.HasEntryAnimation(shape)) return;

            var effectFade = inSlide.GetNativeSlide().TimeLine.MainSequence.AddEffect(shape, MsoAnimEffect.msoAnimEffectAppear,
                MsoAnimateByLevel.msoAnimateLevelNone, MsoAnimTriggerType.msoAnimTriggerWithPrevious, effectStartIndex);
            effectFade.Exit = MsoTriState.msoFalse;
        }
開發者ID:youthinkk,項目名稱:PowerPointLabs,代碼行數:8,代碼來源:Graphics.cs

示例2: AddSlideThumbnail

        private void AddSlideThumbnail(PowerPointSlide slide, int pos = -1, bool isCurrentSlide = false)
        {
            if (slide == null) return;

            var thumbnailPath = TempPath.GetPath("slide-" + DateTime.Now.GetHashCode() + slide.Index);
            slide.GetNativeSlide().Export(thumbnailPath, "JPG", GetPreviewWidth(), PreviewHeight);

            ImageItem imageItem;
            if (isCurrentSlide)
            {
                imageItem = new ImageItem
                {
                    ImageFile = thumbnailPath,
                    Tooltip = "(Current) Slide " + slide.Index
                };
            }
            else
            {
                imageItem = new ImageItem
                {
                    ImageFile = thumbnailPath,
                    Tooltip = "Slide " + slide.Index
                };
            }
            
            Dispatcher.Invoke(new Action(() =>
            {
                if (pos == -1)
                {
                    SlideList.Add(imageItem);
                }
                else
                {
                    SlideList.Insert(pos, imageItem);
                }
            }));
        }
開發者ID:digawp,項目名稱:PowerPointLabs,代碼行數:37,代碼來源:SlideSelectionDialog.xaml.cs

示例3: GetTransitionFromSlide

 /// <summary>
 /// Extracts the transition animation out of slide to be used as a transition animation for shapes.
 /// For now, it only extracts the trigger type (trigger by wait or by mouse click), not actual slide transitions.
 /// </summary>
 private static EffectTransition GetTransitionFromSlide(PowerPointSlide slide)
 {
     var transition = slide.GetNativeSlide().SlideShowTransition;
     
     if (transition.AdvanceOnTime == MsoTriState.msoTrue)
     {
         return new EffectTransition(MsoAnimTriggerType.msoAnimTriggerAfterPrevious, transition.AdvanceTime);
     }
     return new EffectTransition(MsoAnimTriggerType.msoAnimTriggerOnPageClick, 0);
 }
開發者ID:youthinkk,項目名稱:PowerPointLabs,代碼行數:14,代碼來源:Graphics.cs

示例4: ExportSlide

 public static void ExportSlide(PowerPointSlide slide, string exportPath)
 {
     ExportSlide(slide.GetNativeSlide(), exportPath);
 }
開發者ID:youthinkk,項目名稱:PowerPointLabs,代碼行數:4,代碼來源:Graphics.cs

示例5: MakeShapeViewTimeInvisible

 public static void MakeShapeViewTimeInvisible(ShapeRange shapeRange, PowerPointSlide curSlide)
 {
     MakeShapeViewTimeInvisible(shapeRange, curSlide.GetNativeSlide());
 }
開發者ID:youthinkk,項目名稱:PowerPointLabs,代碼行數:4,代碼來源:Graphics.cs

示例6: SelectOriginalSlide

 private static void SelectOriginalSlide(PowerPointSlide originalSlide, PowerPointSlide fallbackToSlide)
 {
     if (originalSlide != null)
     {
         originalSlide.GetNativeSlide().Select();
         return;
     }
     if (fallbackToSlide != null)
     {
         fallbackToSlide.GetNativeSlide().Select();
     }
 }
開發者ID:oswellchan,項目名稱:PowerPointLabs,代碼行數:12,代碼來源:AgendaLabMain.cs

示例7: PrepareForeground

        private static PowerPointBgEffectSlide PrepareForeground(ShapeRange oriShapeRange, ShapeRange copyShapeRange,
                                                                 Slide refSlide, PowerPointSlide newSlide)
        {
            try
            {
                // crop in the original slide and put into clipboard
                var croppedShape = MakeFrontImage(oriShapeRange);

                croppedShape.Cut();

                // swap the uncropped shapes and cropped shapes
                var pastedCrop = newSlide.Shapes.Paste();

                // calibrate pasted shapes
                pastedCrop.Left -= 12;
                pastedCrop.Top -= 12;

                // ungroup front image if necessary
                if (pastedCrop[1].Type == Core.MsoShapeType.msoGroup)
                {
                    pastedCrop[1].Ungroup();
                }

                copyShapeRange.Cut();
                oriShapeRange = refSlide.Shapes.Paste();

                oriShapeRange.Fill.ForeColor.RGB = 0xaaaaaa;
                oriShapeRange.Fill.Transparency = 0.7f;
                oriShapeRange.Line.Visible = Core.MsoTriState.msoTrue;
                oriShapeRange.Line.ForeColor.RGB = 0x000000;

                Utils.Graphics.MakeShapeViewTimeInvisible(oriShapeRange, refSlide);

                oriShapeRange.Select();

                // finally add transition to the new slide
                newSlide.Transition.EntryEffect = PpEntryEffect.ppEffectFadeSmoothly;
                newSlide.Transition.Duration = 0.5f;

                return new PowerPointBgEffectSlide(newSlide.GetNativeSlide());
            }
            catch (Exception e)
            {
                var errorMessage = CropToShape.GetErrorMessageForErrorCode(e.Message);
                errorMessage = errorMessage.Replace("Crop To Shape", "Blur/Recolor Remainder");

                newSlide.Delete();

                throw new InvalidOperationException(errorMessage);
            }
        }
開發者ID:oswellchan,項目名稱:PowerPointLabs,代碼行數:51,代碼來源:PowerPointBgEffectSlide.cs


注:本文中的PowerPointLabs.Models.PowerPointSlide.GetNativeSlide方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。