예제 #1
0
        private ShapeTree InitCommonProperty(Slide slide1)
        {
            CommonSlideData commonSlideData1 = new CommonSlideData();

            ShapeTree shapeTree1 = new ShapeTree();

            NonVisualGroupShapeProperties nonVisualGroupShapeProperties1 = new NonVisualGroupShapeProperties();
            NonVisualDrawingProperties    nonVisualDrawingProperties1    = new NonVisualDrawingProperties()
            {
                Id = (UInt32Value)1U, Name = ""
            };
            NonVisualGroupShapeDrawingProperties  nonVisualGroupShapeDrawingProperties1  = new NonVisualGroupShapeDrawingProperties();
            ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties1 = new ApplicationNonVisualDrawingProperties();

            nonVisualGroupShapeProperties1.Append(nonVisualDrawingProperties1);
            nonVisualGroupShapeProperties1.Append(nonVisualGroupShapeDrawingProperties1);
            nonVisualGroupShapeProperties1.Append(applicationNonVisualDrawingProperties1);

            GroupShapeProperties groupShapeProperties1 = new GroupShapeProperties();

            A.TransformGroup transformGroup1 = new A.TransformGroup();
            A.Offset         offset1         = new A.Offset()
            {
                X = 0L, Y = 0L
            };
            A.Extents extents1 = new A.Extents()
            {
                Cx = 0L, Cy = 0L
            };
            A.ChildOffset childOffset1 = new A.ChildOffset()
            {
                X = 0L, Y = 0L
            };
            A.ChildExtents childExtents1 = new A.ChildExtents()
            {
                Cx = 0L, Cy = 0L
            };

            transformGroup1.Append(offset1);
            transformGroup1.Append(extents1);
            transformGroup1.Append(childOffset1);
            transformGroup1.Append(childExtents1);

            groupShapeProperties1.Append(transformGroup1);

            shapeTree1.Append(nonVisualGroupShapeProperties1);
            shapeTree1.Append(groupShapeProperties1);

            CommonSlideDataExtensionList commonSlideDataExtensionList1 = new CommonSlideDataExtensionList();

            CommonSlideDataExtension commonSlideDataExtension1 = new CommonSlideDataExtension()
            {
                Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}"
            };

            P14.CreationId creationId1 = new P14.CreationId()
            {
                Val = (UInt32Value)4221661300U
            };
            creationId1.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main");

            commonSlideDataExtension1.Append(creationId1);

            commonSlideDataExtensionList1.Append(commonSlideDataExtension1);

            commonSlideData1.Append(shapeTree1);
            commonSlideData1.Append(commonSlideDataExtensionList1);

            ColorMapOverride colorMapOverride1 = new ColorMapOverride();

            A.MasterColorMapping masterColorMapping1 = new A.MasterColorMapping();

            colorMapOverride1.Append(masterColorMapping1);

            slide1.Append(commonSlideData1);
            slide1.Append(colorMapOverride1);

            return(shapeTree1);
        }
예제 #2
0
        private static void GenerateSlidePart1Content(SlidePart slidePart1, string Title, string SubTitle)
        {
            Slide slide1 = new Slide();

            slide1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
            slide1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            slide1.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main");

            CommonSlideData commonSlideData1 = new CommonSlideData();

            ShapeTree shapeTree1 = new ShapeTree();

            NonVisualGroupShapeProperties nonVisualGroupShapeProperties1 = new NonVisualGroupShapeProperties();
            NonVisualDrawingProperties    nonVisualDrawingProperties1    = new NonVisualDrawingProperties()
            {
                Id = (UInt32Value)1U, Name = ""
            };
            NonVisualGroupShapeDrawingProperties  nonVisualGroupShapeDrawingProperties1  = new NonVisualGroupShapeDrawingProperties();
            ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties1 = new ApplicationNonVisualDrawingProperties();

            nonVisualGroupShapeProperties1.Append(nonVisualDrawingProperties1);
            nonVisualGroupShapeProperties1.Append(nonVisualGroupShapeDrawingProperties1);
            nonVisualGroupShapeProperties1.Append(applicationNonVisualDrawingProperties1);

            GroupShapeProperties groupShapeProperties1 = new GroupShapeProperties();

            A.TransformGroup transformGroup1 = new A.TransformGroup();
            A.Offset         offset1         = new A.Offset()
            {
                X = 0L, Y = 0L
            };
            A.Extents extents1 = new A.Extents()
            {
                Cx = 0L, Cy = 0L
            };
            A.ChildOffset childOffset1 = new A.ChildOffset()
            {
                X = 0L, Y = 0L
            };
            A.ChildExtents childExtents1 = new A.ChildExtents()
            {
                Cx = 0L, Cy = 0L
            };

            transformGroup1.Append(offset1);
            transformGroup1.Append(extents1);
            transformGroup1.Append(childOffset1);
            transformGroup1.Append(childExtents1);

            groupShapeProperties1.Append(transformGroup1);

            Shape shape1 = new Shape();

            NonVisualShapeProperties nonVisualShapeProperties1 = new NonVisualShapeProperties();

            NonVisualDrawingProperties nonVisualDrawingProperties2 = new NonVisualDrawingProperties()
            {
                Id = (UInt32Value)4U, Name = "タイトル 3"
            };

            A.NonVisualDrawingPropertiesExtensionList nonVisualDrawingPropertiesExtensionList1 = new A.NonVisualDrawingPropertiesExtensionList();

            A.NonVisualDrawingPropertiesExtension nonVisualDrawingPropertiesExtension1 = new A.NonVisualDrawingPropertiesExtension()
            {
                Uri = "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"
            };

            OpenXmlUnknownElement openXmlUnknownElement1 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" id=\"{D363C360-A613-482D-ABFE-96D29918ABD2}\" />");

            nonVisualDrawingPropertiesExtension1.Append(openXmlUnknownElement1);

            nonVisualDrawingPropertiesExtensionList1.Append(nonVisualDrawingPropertiesExtension1);

            nonVisualDrawingProperties2.Append(nonVisualDrawingPropertiesExtensionList1);

            NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties1 = new NonVisualShapeDrawingProperties();

            A.ShapeLocks shapeLocks1 = new A.ShapeLocks()
            {
                NoGrouping = true
            };

            nonVisualShapeDrawingProperties1.Append(shapeLocks1);

            ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties2 = new ApplicationNonVisualDrawingProperties();
            PlaceholderShape placeholderShape1 = new PlaceholderShape()
            {
                Type = PlaceholderValues.CenteredTitle
            };

            applicationNonVisualDrawingProperties2.Append(placeholderShape1);

            nonVisualShapeProperties1.Append(nonVisualDrawingProperties2);
            nonVisualShapeProperties1.Append(nonVisualShapeDrawingProperties1);
            nonVisualShapeProperties1.Append(applicationNonVisualDrawingProperties2);
            ShapeProperties shapeProperties1 = new ShapeProperties();

            TextBody textBody1 = new TextBody();

            A.BodyProperties bodyProperties1 = new A.BodyProperties();
            A.ListStyle      listStyle1      = new A.ListStyle();

            A.Paragraph paragraph1 = new A.Paragraph();

            A.Run           run1           = new A.Run();
            A.RunProperties runProperties1 = new A.RunProperties()
            {
                Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US", Dirty = false
            };
            A.Text text1 = new A.Text();
            text1.Text = Title;

            run1.Append(runProperties1);
            run1.Append(text1);

            paragraph1.Append(run1);

            textBody1.Append(bodyProperties1);
            textBody1.Append(listStyle1);
            textBody1.Append(paragraph1);

            shape1.Append(nonVisualShapeProperties1);
            shape1.Append(shapeProperties1);
            shape1.Append(textBody1);

            Shape shape2 = new Shape();

            NonVisualShapeProperties nonVisualShapeProperties2 = new NonVisualShapeProperties();

            NonVisualDrawingProperties nonVisualDrawingProperties3 = new NonVisualDrawingProperties()
            {
                Id = (UInt32Value)5U, Name = "字幕 4"
            };

            A.NonVisualDrawingPropertiesExtensionList nonVisualDrawingPropertiesExtensionList2 = new A.NonVisualDrawingPropertiesExtensionList();

            A.NonVisualDrawingPropertiesExtension nonVisualDrawingPropertiesExtension2 = new A.NonVisualDrawingPropertiesExtension()
            {
                Uri = "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"
            };

            OpenXmlUnknownElement openXmlUnknownElement2 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" id=\"{6CE3DF81-72AF-4DA1-B4EE-02B2D45D0AF8}\" />");

            nonVisualDrawingPropertiesExtension2.Append(openXmlUnknownElement2);

            nonVisualDrawingPropertiesExtensionList2.Append(nonVisualDrawingPropertiesExtension2);

            nonVisualDrawingProperties3.Append(nonVisualDrawingPropertiesExtensionList2);

            NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties2 = new NonVisualShapeDrawingProperties();

            A.ShapeLocks shapeLocks2 = new A.ShapeLocks()
            {
                NoGrouping = true
            };

            nonVisualShapeDrawingProperties2.Append(shapeLocks2);

            ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties3 = new ApplicationNonVisualDrawingProperties();
            PlaceholderShape placeholderShape2 = new PlaceholderShape()
            {
                Type = PlaceholderValues.SubTitle, Index = (UInt32Value)1U
            };

            applicationNonVisualDrawingProperties3.Append(placeholderShape2);

            nonVisualShapeProperties2.Append(nonVisualDrawingProperties3);
            nonVisualShapeProperties2.Append(nonVisualShapeDrawingProperties2);
            nonVisualShapeProperties2.Append(applicationNonVisualDrawingProperties3);
            ShapeProperties shapeProperties2 = new ShapeProperties();

            TextBody textBody2 = new TextBody();

            A.BodyProperties bodyProperties2 = new A.BodyProperties();
            A.ListStyle      listStyle2      = new A.ListStyle();

            A.Paragraph paragraph2 = new A.Paragraph();

            A.Run           run2           = new A.Run();
            A.RunProperties runProperties2 = new A.RunProperties()
            {
                Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US"
            };
            A.Text text2 = new A.Text();
            text2.Text = SubTitle;

            run2.Append(runProperties2);
            run2.Append(text2);

            paragraph2.Append(run2);

            textBody2.Append(bodyProperties2);
            textBody2.Append(listStyle2);
            textBody2.Append(paragraph2);

            shape2.Append(nonVisualShapeProperties2);
            shape2.Append(shapeProperties2);
            shape2.Append(textBody2);

            shapeTree1.Append(nonVisualGroupShapeProperties1);
            shapeTree1.Append(groupShapeProperties1);
            shapeTree1.Append(shape1);
            shapeTree1.Append(shape2);

            CommonSlideDataExtensionList commonSlideDataExtensionList1 = new CommonSlideDataExtensionList();

            CommonSlideDataExtension commonSlideDataExtension1 = new CommonSlideDataExtension()
            {
                Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}"
            };

            P14.CreationId creationId1 = new P14.CreationId()
            {
                Val = (UInt32Value)958156500U
            };
            creationId1.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main");

            commonSlideDataExtension1.Append(creationId1);

            commonSlideDataExtensionList1.Append(commonSlideDataExtension1);

            commonSlideData1.Append(shapeTree1);
            commonSlideData1.Append(commonSlideDataExtensionList1);

            ColorMapOverride colorMapOverride1 = new ColorMapOverride();

            A.MasterColorMapping masterColorMapping1 = new A.MasterColorMapping();

            colorMapOverride1.Append(masterColorMapping1);

            slide1.Append(commonSlideData1);
            slide1.Append(colorMapOverride1);

            slidePart1.Slide = slide1;
        }
예제 #3
0
        public static void InitTiming(Slide slide)
        {
            Timing timing1 = new Timing();

            TimeNodeList timeNodeList1 = new TimeNodeList();

            ParallelTimeNode parallelTimeNode1 = new ParallelTimeNode();

            CommonTimeNode commonTimeNode1 = new CommonTimeNode()
            {
                Id = (UInt32Value)1U, Duration = "indefinite", Restart = TimeNodeRestartValues.Never, NodeType = TimeNodeValues.TmingRoot
            };

            ChildTimeNodeList childTimeNodeList1 = new ChildTimeNodeList();

            SequenceTimeNode sequenceTimeNode1 = new SequenceTimeNode()
            {
                Concurrent = true, NextAction = NextActionValues.Seek
            };

            CommonTimeNode commonTimeNode2 = new CommonTimeNode()
            {
                Id = (UInt32Value)2U, Restart = TimeNodeRestartValues.WhenNotActive, Fill = TimeNodeFillValues.Hold, EventFilter = "cancelBubble", NodeType = TimeNodeValues.InteractiveSequence
            };

            StartConditionList startConditionList1 = new StartConditionList();

            Condition condition1 = new Condition()
            {
                Event = TriggerEventValues.OnClick, Delay = "0"
            };

            TargetElement targetElement1 = new TargetElement();
            ShapeTarget   shapeTarget1   = new ShapeTarget()
            {
                ShapeId = "3"
            };

            targetElement1.Append(shapeTarget1);

            condition1.Append(targetElement1);

            startConditionList1.Append(condition1);

            EndSync endSync1 = new EndSync()
            {
                Event = TriggerEventValues.End, Delay = "0"
            };
            RuntimeNodeTrigger runtimeNodeTrigger1 = new RuntimeNodeTrigger()
            {
                Val = TriggerRuntimeNodeValues.All
            };

            endSync1.Append(runtimeNodeTrigger1);

            ChildTimeNodeList childTimeNodeList2 = new ChildTimeNodeList();

            ParallelTimeNode parallelTimeNode2 = new ParallelTimeNode();

            CommonTimeNode commonTimeNode3 = new CommonTimeNode()
            {
                Id = (UInt32Value)3U, Fill = TimeNodeFillValues.Hold
            };

            StartConditionList startConditionList2 = new StartConditionList();
            Condition          condition2          = new Condition()
            {
                Delay = "0"
            };

            startConditionList2.Append(condition2);

            ChildTimeNodeList childTimeNodeList3 = new ChildTimeNodeList();

            ParallelTimeNode parallelTimeNode3 = new ParallelTimeNode();

            CommonTimeNode commonTimeNode4 = new CommonTimeNode()
            {
                Id = (UInt32Value)4U, Fill = TimeNodeFillValues.Hold
            };

            StartConditionList startConditionList3 = new StartConditionList();
            Condition          condition3          = new Condition()
            {
                Delay = "0"
            };

            startConditionList3.Append(condition3);

            ChildTimeNodeList childTimeNodeList4 = new ChildTimeNodeList();

            ParallelTimeNode parallelTimeNode4 = new ParallelTimeNode();

            CommonTimeNode commonTimeNode5 = new CommonTimeNode()
            {
                Id = (UInt32Value)5U, PresetId = 2, PresetClass = TimeNodePresetClassValues.MediaCall, PresetSubtype = 0, Fill = TimeNodeFillValues.Hold, NodeType = TimeNodeValues.ClickEffect
            };

            StartConditionList startConditionList4 = new StartConditionList();
            Condition          condition4          = new Condition()
            {
                Delay = "0"
            };

            startConditionList4.Append(condition4);

            ChildTimeNodeList childTimeNodeList5 = new ChildTimeNodeList();

            Command command1 = new Command()
            {
                Type = CommandValues.Call, CommandName = "togglePause"
            };

            CommonBehavior commonBehavior1 = new CommonBehavior();
            CommonTimeNode commonTimeNode6 = new CommonTimeNode()
            {
                Id = (UInt32Value)6U, Duration = "1", Fill = TimeNodeFillValues.Hold
            };

            TargetElement targetElement2 = new TargetElement();
            ShapeTarget   shapeTarget2   = new ShapeTarget()
            {
                ShapeId = "3"
            };

            targetElement2.Append(shapeTarget2);

            commonBehavior1.Append(commonTimeNode6);
            commonBehavior1.Append(targetElement2);

            command1.Append(commonBehavior1);

            childTimeNodeList5.Append(command1);

            commonTimeNode5.Append(startConditionList4);
            commonTimeNode5.Append(childTimeNodeList5);

            parallelTimeNode4.Append(commonTimeNode5);

            childTimeNodeList4.Append(parallelTimeNode4);

            commonTimeNode4.Append(startConditionList3);
            commonTimeNode4.Append(childTimeNodeList4);

            parallelTimeNode3.Append(commonTimeNode4);

            childTimeNodeList3.Append(parallelTimeNode3);

            commonTimeNode3.Append(startConditionList2);
            commonTimeNode3.Append(childTimeNodeList3);

            parallelTimeNode2.Append(commonTimeNode3);

            childTimeNodeList2.Append(parallelTimeNode2);

            commonTimeNode2.Append(startConditionList1);
            commonTimeNode2.Append(endSync1);
            commonTimeNode2.Append(childTimeNodeList2);

            NextConditionList nextConditionList1 = new NextConditionList();

            Condition condition5 = new Condition()
            {
                Event = TriggerEventValues.OnClick, Delay = "0"
            };

            TargetElement targetElement3 = new TargetElement();
            ShapeTarget   shapeTarget3   = new ShapeTarget()
            {
                ShapeId = "3"
            };

            targetElement3.Append(shapeTarget3);

            condition5.Append(targetElement3);

            nextConditionList1.Append(condition5);

            sequenceTimeNode1.Append(commonTimeNode2);
            sequenceTimeNode1.Append(nextConditionList1);

            Video video1 = new Video();

            CommonMediaNode commonMediaNode1 = new CommonMediaNode()
            {
                Volume = 80000
            };

            CommonTimeNode commonTimeNode7 = new CommonTimeNode()
            {
                Id = (UInt32Value)7U, Fill = TimeNodeFillValues.Hold, Display = false
            };

            StartConditionList startConditionList5 = new StartConditionList();
            Condition          condition6          = new Condition()
            {
                Delay = "indefinite"
            };

            startConditionList5.Append(condition6);

            commonTimeNode7.Append(startConditionList5);

            TargetElement targetElement4 = new TargetElement();
            ShapeTarget   shapeTarget4   = new ShapeTarget()
            {
                ShapeId = "3"
            };

            targetElement4.Append(shapeTarget4);

            commonMediaNode1.Append(commonTimeNode7);
            commonMediaNode1.Append(targetElement4);

            video1.Append(commonMediaNode1);

            childTimeNodeList1.Append(sequenceTimeNode1);
            childTimeNodeList1.Append(video1);

            commonTimeNode1.Append(childTimeNodeList1);

            parallelTimeNode1.Append(commonTimeNode1);

            timeNodeList1.Append(parallelTimeNode1);

            timing1.Append(timeNodeList1);

            slide.Append(timing1);
        }