Sfoglia il codice sorgente

动画解析阶段性保存

CrazyIter 4 anni fa
parent
commit
f828339d38

+ 288 - 56
HTEXLib/Animations/AnimationTypes.cs

@@ -6,95 +6,327 @@ namespace HTEXLib.Animations
 {
 {
     internal class AnimationTypes
     internal class AnimationTypes
     {
     {
-        public const string FlyIn = "FlyIn";
-        public const string FlyOut = "FlyOut";
-        public const string Sling = "Sling";
-        public const string Appear = "Appear";
-        public const string Strips = "Strips";
+
+        ///  <summary>
+        ///name:	百叶窗	code:	Blinds	id:	3
+        /// </summary>
         public const string Blinds = "Blinds";
         public const string Blinds = "Blinds";
+        ///  <summary>
+        ///name:	擦除	code:	Wipe	id:	22
+        /// </summary>
+        public const string Wipe = "Wipe";
+        ///  <summary>
+        ///name:	出现	code:	Appear	id:	1
+        /// </summary>
+        public const string Appear = "Appear";
+        ///  <summary>
+        ///name:	飞入	code:	FlyIn	id:	2
+        /// </summary>
+        public const string FlyIn = "FlyIn";
+        ///  <summary>
+        ///name:	盒状	code:	Box	id:	4
+        /// </summary>
         public const string Box = "Box";
         public const string Box = "Box";
-        public const string Glide = "Glide";
-        public const string Swivel = "Swivel";
+        ///  <summary>
+        ///name:	阶梯状	code:	Strips	id:	18
+        /// </summary>
+        public const string Strips = "Strips";
+        ///  <summary>
+        ///name:	菱形	code:	Diamond	id:	8
+        /// </summary>
+        public const string Diamond = "Diamond";
+        ///  <summary>
+        ///name:	轮子	code:	Wheel	id:	21
+        /// </summary>
+        public const string Wheel = "Wheel";
+        ///  <summary>
+        ///name:	劈裂	code:	Split	id:	16
+        /// </summary>
+        public const string Split = "Split";
+        ///  <summary>
+        ///name:	棋盘	code:	Checkerboard	id:	5
+        /// </summary>
+        public const string Checkerboard = "Checkerboard";
+        ///  <summary>
+        ///name:	切入	code:	PeekIn	id:	12
+        /// </summary>
+        public const string PeekIn = "PeekIn";
+        ///  <summary>
+        ///name:	十字形扩展	code:	Plus	id:	13
+        /// </summary>
+        public const string Plus = "Plus";
+        ///  <summary>
+        ///name:	随机线条	code:	RandomBars	id:	14
+        /// </summary>
+        public const string RandomBars = "RandomBars";
+        ///  <summary>
+        ///name:	向内溶解	code:	Dissolve	id:	9
+        /// </summary>
+        public const string Dissolve = "Dissolve";
+        ///  <summary>
+        ///name:	楔入	code:	Wedge	id:	20
+        /// </summary>
+        public const string Wedge = "Wedge";
+        ///  <summary>
+        ///name:	圆形扩展	code:	Circle	id:	6
+        /// </summary>
+        public const string Circle = "Circle";
+        ///  <summary>
+        ///name:	淡化	code:	Fade	id:	10
+        /// </summary>
+        public const string Fade = "Fade";
+        ///  <summary>
+        ///name:	缩放	code:	FadedZoom	id:	53
+        /// </summary>
+        public const string FadedZoom = "FadedZoom";
+        ///  <summary>
+        ///name:	旋转45	code:	Gyrate	id:	45
+        /// </summary>
+        public const string Gyrate = "Gyrate";
+        ///  <summary>
+        ///name:	展开	code:	Expand	id:	55
+        /// </summary>
+        public const string Expand = "Expand";
+        ///  <summary>
+        ///name:	翻转式由远及近	code:	GrowTurn	id:	31
+        /// </summary>
+        public const string GrowTurn = "GrowTurn";
+        ///  <summary>
+        ///name:	回旋	code:	Spinner	id:	49
+        /// </summary>
+        public const string Spinner = "Spinner";
+        ///  <summary>
+        ///name:	基本縮放	code:	Zoom	id:	23
+        /// </summary>
+        public const string Zoom = "Zoom";
+        ///  <summary>
+        ///name:	上浮	code:	Ascend	id:	42
+        /// </summary>
         public const string Ascend = "Ascend";
         public const string Ascend = "Ascend";
-        public const string Boomerang = "Boomerang";
-        public const string CenterRevolve = "CenterRevolve";
+        ///  <summary>
+        ///name:	伸展	code:	Stretch	id:	17
+        /// </summary>
+        public const string Stretch = "Stretch";
+        ///  <summary>
+        ///name:	升起	code:	RiseUp	id:	37
+        /// </summary>
+        public const string RiseUp = "RiseUp";
+        ///  <summary>
+        ///name:	下浮	code:	Descend	id:	47
+        /// </summary>
+        public const string Descend = "Descend";
+        ///  <summary>
+        ///name:	压缩	code:	Compress	id:	50
+        /// </summary>
         public const string Compress = "Compress";
         public const string Compress = "Compress";
+        ///  <summary>
+        ///name:	中心旋转	code:	CenterRevolve	id:	43
+        /// </summary>
+        public const string CenterRevolve = "CenterRevolve";
+        ///  <summary>
+        ///name:	弹跳	code:	Bounce	id:	26
+        /// </summary>
+        public const string Bounce = "Bounce";
+        ///  <summary>
+        ///name:	掉落38	code:	FallDown	id:	38
+        /// </summary>
+        public const string FallDown = "FallDown";
+        ///  <summary>
+        ///name:	飞旋	code:	Boomerang	id:	25
+        /// </summary>
+        public const string Boomerang = "Boomerang";
+        ///  <summary>
+        ///name:	浮动	code:	Float	id:	30
+        /// </summary>
+        public const string Float = "Float";
+        ///  <summary>
+        ///name:	挥鞭式41	code:	Whip	id:	41
+        /// </summary>
+        public const string Whip = "Whip";
+        ///  <summary>
+        ///name:	基本旋转	code:	Swivel	id:	19
+        /// </summary>
+        public const string Swivel = "Swivel";
+        ///  <summary>
+        ///name:	空翻56	code:	Flip	id:	56
+        /// </summary>
+        public const string Flip = "Flip";
+        ///  <summary>
+        ///name:	螺旋飞入	code:	SpiralIn	id:	15
+        /// </summary>
+        public const string SpiralIn = "SpiralIn";
+        ///  <summary>
+        ///name:	曲线向上	code:	CurveUp	id:	52
+        /// </summary>
+        public const string CurveUp = "CurveUp";
+        ///  <summary>
+        ///name:	玩具风车	code:	Pinwheel	id:	35
+        /// </summary>
+        public const string Pinwheel = "Pinwheel";
+        ///  <summary>
+        ///name:	字幕式	code:	Credits	id:	28
+        /// </summary>
+        public const string Credits = "Credits";
+
+        ///  <summary>
+        ///name:	放大/缩小	code:	GrowShrink	id:	6
+        /// </summary>
+        public const string GrowShrink = "GrowShrink";
+        ///  <summary>
+        ///name:	透明	code:	Transparency	id:	9
+        /// </summary>
+        public const string Transparency = "Transparency";
+        ///  <summary>
+        ///name:	填充颜色 1	code:	FillColor 	id:	1
+        /// </summary>
+        public const string FillColor = "FillColor ";
+        ///  <summary>
+        ///name:	陀螺旋	code:	Spin	id:	8
+        /// </summary>
+        public const string Spin = "Spin";
+        ///  <summary>
+        ///name:	线条颜色7	code:	LineColor	id:	7
+        /// </summary>
+        public const string LineColor = "LineColor";
+        ///  <summary>
+        ///name:	字体颜色	code:	ChangeFontColor	id:	3
+        /// </summary>
+        public const string ChangeFontColor = "ChangeFontColor";
+        ///  <summary>
+        ///name:	变淡30	code:	Lighten	id:	30
+        /// </summary>
+        public const string Lighten = "Lighten";
+        ///  <summary>
+        ///name:	补色21	code:	CompColor	id:	21
+        /// </summary>
+        public const string CompColor = "CompColor";
+        ///  <summary>
+        ///name:	补色2 22	code:	CompColor2	id:	22
+        /// </summary>
+        public const string CompColor2 = "CompColor2";
+        ///  <summary>
+        ///name:	不饱和25	code:	Unsaturation	id:	25
+        /// </summary>
+        public const string Unsaturation = "Unsaturation";
+        ///  <summary>
+        ///name:	对比色23	code:	ContrastColor	id:	23
+        /// </summary>
+        public const string ContrastColor = "ContrastColor";
+        ///  <summary>
+        ///name:	对象颜色	code:	ColorBlend	id:	19
+        /// </summary>
+        public const string ColorBlend = "ColorBlend";
+        ///  <summary>
+        ///name:	画笔颜色	code:	BrushOnColor	id:	16
+        /// </summary>
+        public const string BrushOnColor = "BrushOnColor";
+        ///  <summary>
+        ///name:	加深24	code:	Deepen	id:	24
+        /// </summary>
+        public const string Deepen = "Deepen";
+        ///  <summary>
+        ///name:	脉冲	code:	FlashBulb	id:	26
+        /// </summary>
+        public const string FlashBulb = "FlashBulb";
+        ///  <summary>
+        ///name:	下划线18	code:	Underline	id:	18
+        /// </summary>
+        public const string Underline = "Underline";
+        ///  <summary>
+        ///name:	加粗闪烁 10	code:	BoldBlink	id:	10
+        /// </summary>
+        public const string BoldBlink = "BoldBlink";
+        ///  <summary>
+        ///name:	彩色脉冲	code:	Flicker	id:	27
+        /// </summary>
+        public const string Flicker = "Flicker";
+        ///  <summary>
+        ///name:	跷跷板	code:	Teeter	id:	32
+        /// </summary>
+        public const string Teeter = "Teeter";
+        ///  <summary>
+        ///name:	闪现	code:	Shimmer	id:	36
+        /// </summary>
+        public const string Shimmer = "Shimmer";
+        ///  <summary>
+        ///name:	彩色延伸	code:	GrowwithColor	id:	28
+        /// </summary>
+        public const string GrowwithColor = "GrowwithColor";
+        ///  <summary>
+        ///name:	波浪形	code:	Wave	id:	34
+        /// </summary>
+        public const string Wave = "Wave";
+        ///  <summary>
+        ///name:	加粗展示15	code:	BoldShow	id:	15
+        /// </summary>
+        public const string BoldShow = "BoldShow";
+        ///  <summary>
+        ///name:	闪烁	code:	Blink	id:	35
+        /// </summary>
+        public const string Blink = "Blink";
+        
+        ///  <summary>
+        ///name:	飞出	code:	FlyOut	id:	2
+        /// </summary>
+        public const string FlyOut = "FlyOut";
+        
+        ///  <summary>
+        ///name:	切出	code:	PeekOut	id:	12
+        /// </summary>
+        public const string PeekOut = "PeekOut";
+       
+        ///  <summary>
+        ///name:	收缩	code:	Contract	id:	55
+        /// </summary>
+        public const string Contract = "Contract";
+      
+        ///  <summary>
+        ///name:	下沉	code:	SinkDown	id:	37
+        /// </summary>
+        public const string SinkDown = "SinkDown";
+       
+        ///  <summary>
+        ///name:	螺旋飞出	code:	SpiralOut	id:	15
+        /// </summary>
+        public const string SpiralOut = "SpiralOut";
+        ///  <summary>
+        ///name:	向下曲线	code:	CurveDown	id:	52
+        /// </summary>
+        public const string CurveDown = "CurveDown";
+        public const string Sling = "Sling";
+        public const string Glide = "Glide";
         public const string CrawlIn = "CrawlIn";
         public const string CrawlIn = "CrawlIn";
         public const string CrawlOut = "CrawlOut";
         public const string CrawlOut = "CrawlOut";
-        public const string Descend = "Descend";
         public const string EaseIn = "EaseIn";
         public const string EaseIn = "EaseIn";
         public const string EaseOut = "EaseOut";
         public const string EaseOut = "EaseOut";
-        public const string Expand = "Expand";
-        public const string Contract = "Contract";
-        public const string FadedZoom = "FadedZoom";
         public const string FlashOnce = "FlashOnce";
         public const string FlashOnce = "FlashOnce";
         public const string Fold = "Fold";
         public const string Fold = "Fold";
-        public const string GrowTurn = "GrowTurn";
-        public const string Pinwheel = "Pinwheel";
-        public const string RiseUp = "RiseUp";
-        public const string SinkDown = "SinkDown";
-        public const string Spinner = "Spinner";
-        public const string Bounce = "Bounce";
-        public const string Credits = "Credits";
-        public const string CurveUp = "CurveUp";
-        public const string CurveDown = "CurveDown";
-        public const string Dissolve = "Dissolve";
-        public const string Float = "Float";
         public const string LightSpeed = "LightSpeed";
         public const string LightSpeed = "LightSpeed";
         public const string Magnify = "Magnify";
         public const string Magnify = "Magnify";
-        public const string SpiralIn = "SpiralIn";
-        public const string SpiralOut = "SpiralOut";
-        public const string Stretch = "Stretch";
         public const string Thread = "Thread";
         public const string Thread = "Thread";
-        public const string Wheel = "Wheel";
-        public const string Zoom = "Zoom";
-        public const string Spin = "Spin";
-        public const string GrowShrink = "GrowShrink";
-        public const string Checkerboard = "Checkerboard";
-        public const string Circle = "Circle";
-        public const string Diamond = "Diamond";
-        public const string Fade = "Fade";
-        public const string Plus = "Plus";
-        public const string Wipe = "Wipe";
-        public const string PeekOut = "PeekOut";
-        public const string PeekIn = "PeekIn";
-        public const string Split = "Split";
         public const string Push = "Push";
         public const string Push = "Push";
         public const string FadeThroughBlack = "FadeThroughBlack";
         public const string FadeThroughBlack = "FadeThroughBlack";
         public const string Cut = "Cut";
         public const string Cut = "Cut";
         public const string CutThroughBlack = "CutThroughBlack";
         public const string CutThroughBlack = "CutThroughBlack";
         public const string DissolveIn = "DissolveIn";
         public const string DissolveIn = "DissolveIn";
-        public const string Wedge = "Wedge";
         public const string UnCover = "UnCover";
         public const string UnCover = "UnCover";
         public const string Newsflash = "Newsflash";
         public const string Newsflash = "Newsflash";
-        public const string RandomBars = "RandomBars";
         public const string MotionPath = "MotionPath";
         public const string MotionPath = "MotionPath";
         public const string TypePath = "path";
         public const string TypePath = "path";
         public const string TypeEntrance = "entr";
         public const string TypeEntrance = "entr";
         public const string TypeExit = "exit";
         public const string TypeExit = "exit";
         public const string TypeEmphasis = "emph";
         public const string TypeEmphasis = "emph";
-        public const string ChangeFontColor = "ChangeFontColor";
         public const string ColorWave = "ColorWave";
         public const string ColorWave = "ColorWave";
-        public const string ColorBlend = "ColorBlend";
-        public const string BrushOnColor = "BrushOnColor";
         public const string Blast = "Blast";
         public const string Blast = "Blast";
-        public const string FlashBulb = "FlashBulb";
-        public const string Blink = "Blink";
-        public const string Transparency = "Transparency";
         public const string VerticalHighlight = "VerticalHighlight";
         public const string VerticalHighlight = "VerticalHighlight";
-        public const string Flicker = "Flicker";
-        public const string Shimmer = "Shimmer";
-        public const string GrowwithColor = "GrowwithColor";
-        public const string Teeter = "Teeter";
-        public const string Wave = "Wave";
         //新增
         //新增
-        public const string mediacall = "mediacall";
-        public const string verb = "verb";
+        public const string Mediacall = "mediacall";
+        public const string Verb = "verb";
         public const string Checker = "Checker";
         public const string Checker = "Checker";
         public const string Comb = "Comb";
         public const string Comb = "Comb";
         public const string Cover = "Cover";
         public const string Cover = "Cover";
         public const string Pull = "Pull";
         public const string Pull = "Pull";
         public const string Random = "Random";
         public const string Random = "Random";
-        public const string RandomBar = "RandomBar";
+     //   public const string RandomBar = "RandomBar";
     }
     }
 }
 }

+ 350 - 0
HTEXLib/Animations/AnimtimeGenerator.cs

@@ -0,0 +1,350 @@
+using DocumentFormat.OpenXml.Presentation;
+using HTEXLib.Models;
+using HTEXLib.Models.Inner;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Text;
+using static HTEXLib.Animations.MotionPathAnimation;
+
+namespace HTEXLib.Animations
+{
+   public class AnimtimeGenerator
+    {
+        public PPTSlide Slide { get; set; }
+        public AnimtimeGenerator(PPTSlide slide)
+        {
+            this.Slide = slide;
+        }
+        public Animtime GetAnimtimeByCommonTimeNode(CommonTimeNode commonTimeNode) {
+            ///路径方式
+            Animtime animtime = null;
+            SimpleAnimation result = new SimpleAnimation();
+            if (AnimationTypes.TypePath.Equals(commonTimeNode.PresetClass))
+            {
+                result = new MotionPathAnimation(commonTimeNode, Slide.slideIndex);
+
+                List<PathPart> pathParts = ((MotionPathAnimation)result).motionPath;
+                animtime = new PathAnimtime() {path=pathParts};
+               
+            }
+            ///进入
+            else if (AnimationTypes.TypeEntrance.Equals(commonTimeNode.PresetClass))
+            {
+                result = HandleEntr_Exit_Animation(commonTimeNode, result);
+                
+                animtime = new EntrAnimtime();
+            }
+            ///退出
+            else if (AnimationTypes.TypeExit.Equals(commonTimeNode.PresetClass))
+            {
+                result = HandleEntr_Exit_Animation(commonTimeNode, result);
+                animtime = new ExitAnimtime();
+            }
+            ///强调
+            else if (AnimationTypes.TypeEmphasis.Equals(commonTimeNode.PresetClass))
+            {
+                result = HandleEmphasisAnimation(commonTimeNode, result);
+                EmphasisAnimation emphasis = ((EmphasisAnimation)result);
+                animtime = new EmphAnimtime() { RGBColor = emphasis.RGBColor};
+            }
+
+            else if (AnimationTypes.Verb.Equals(commonTimeNode.PresetClass))
+            {
+                ///未用到
+            }
+            else if (AnimationTypes.Mediacall.Equals(commonTimeNode.PresetClass))
+            {
+                ///未用到
+            }
+
+         
+            //Get the speed from one of the nodes common behavior. Hopefully all nodes have the same speed (since the animation is the same).
+            foreach (Object xmlEl in commonTimeNode.Descendants())
+                if (xmlEl.GetType().Equals(typeof(CommonBehavior)))
+                {
+                    CommonBehavior bhvr = ((CommonBehavior)xmlEl);
+                    if (bhvr.CommonTimeNode != null)
+                    {
+                        result.FixAnimationTimings(bhvr, Slide.slideIndex);
+                        if (result.Length <= 1)
+                            continue;
+                        if (result.Start == 0)
+                        {
+                            if (commonTimeNode.StartConditionList != null) {
+                                Condition condition = commonTimeNode.StartConditionList.FirstChild as Condition;
+                                if (!condition.Delay.Equals("indefinite"))
+                                    result.Start = int.Parse(condition.Delay);
+                            }
+                        }
+                        break;
+                    }
+                }
+            if (result.Length <= 1)
+                result.Length = 100;  //Default value??
+            if (animtime != null) {
+                animtime.nodeType = commonTimeNode.NodeType;
+                animtime.presetSubtype = commonTimeNode.PresetSubtype;
+                animtime.id = commonTimeNode.Id.Value;
+                animtime.presetClass = commonTimeNode.PresetClass;
+                animtime.presetId = commonTimeNode.PresetId;
+                animtime.presetSubtype = commonTimeNode.PresetSubtype;
+                animtime.accel = commonTimeNode.Acceleration != null ? commonTimeNode.Acceleration.Value : 0;
+                animtime.decel = commonTimeNode.Deceleration != null ? commonTimeNode.Deceleration.Value : 0;
+                animtime.autorev = commonTimeNode.AutoReverse!=null ? commonTimeNode.AutoReverse.Value:false;
+                animtime.repeat = commonTimeNode.RepeatCount != null ? commonTimeNode.RepeatCount.Value : "";
+                animtime.repeatDur = commonTimeNode.RepeatDuration != null ? commonTimeNode.RepeatDuration.Value : "";
+                animtime.dur = commonTimeNode.Duration != null ? commonTimeNode.Duration.Value : "";
+                animtime.speed = commonTimeNode.Speed != null ? commonTimeNode.Speed.Value : 0;
+                animtime.fill = commonTimeNode.Fill != null ? commonTimeNode.Fill.Value.ToString() : "";
+                animtime.tmfilter = commonTimeNode.TimeFilter != null ? commonTimeNode.TimeFilter.Value : "";
+                var iterate = commonTimeNode.Iterate;
+                if (iterate != null) {
+                    animtime.iterate_tmabs = iterate.TimeAbsolute!=null?iterate.TimeAbsolute.Val.Value:"";
+                    animtime.iterate_tmpct = iterate.TimePercentage != null ? iterate.TimePercentage.Val.Value:0;
+                    animtime.iterate_type = iterate.Type != null ? iterate.Type.Value.ToString():"" ;
+                }
+                animtime.restart = commonTimeNode.Restart != null ? commonTimeNode.Restart.Value.ToString() : "";
+                animtime.display = commonTimeNode.Display != null ? commonTimeNode.Display.Value : true;
+                animtime.groupId = commonTimeNode.GroupId != null ? commonTimeNode.GroupId.Value : 0;
+                /*
+                // animtime.presetName = commonTimeNode.
+                if (AnimationTypes.TypeEmphasis.Equals(commonTimeNode.PresetClass))
+                {
+                    result = HandleEmphasisAnimation(commonTimeNode, result);
+                }
+                else if (AnimationTypes.TypeEntrance.Equals(commonTimeNode.PresetClass) || AnimationTypes.TypeExit.Equals(commonTimeNode.PresetClass))
+                {
+                    result = HandleEntr_Exit_Animation(commonTimeNode, result);
+                   
+                }
+                else
+                { 
+                    //TypePath  mediacall  verb
+
+                }
+                */
+                checkIsText(result);
+                animtime.targetId = result.ObjectId;
+                animtime.presetName = result.Type;
+                animtime.length = result.Length;
+                animtime.timeCond = new TimeCond { Delay = result.Start, Event = TriggerEventValues.None.ToString() };
+            }
+            return animtime;
+        }
+        private void checkIsText(SimpleAnimation result)
+        {
+            int res;
+            bool isTextWithEffect = int.TryParse(result.ObjectId, out res) && PPTShape.effectShapes.Contains(Slide.slideIndex + "_" + res);
+
+            int tryParse = 0;
+            if (!int.TryParse(result.ObjectId, out tryParse) || isTextWithEffect)
+            {
+                return;//if it is like 123p -> return;
+            }
+
+            foreach (PPTShapeBase shape in Slide.ContainerShape.Elements)
+                if (typeof(PPTShape).Equals(shape.GetType()) && ((PPTShape)shape).IsText)
+                {
+                    string shapeId = shape.NonVisualShapeProp.Id;
+                    string shapeObjectId = "s1s" + result.ObjectId;
+                    if (shapeId.Equals(shapeObjectId))
+                    {
+                        result.ObjectId = result.ObjectId + "p0";// TODO check when multiple paragraphs
+                    }
+                }
+        }
+        /// <summary>
+        /// 获取进入
+        /// </summary>
+        /// <param name="commonTimeNode"></param>
+        /// <param name="result"></param>
+        /// <returns></returns>
+        private SimpleAnimation HandleEntr_Exit_Animation(CommonTimeNode commonTimeNode, SimpleAnimation result)
+        {
+            switch (commonTimeNode.PresetId.Value)  //Presets for Entrance/Exit
+            {
+                case 1: result.Type = AnimationTypes.Appear; break;
+                case 54: result.Type = AnimationTypes.Glide; break;
+                case 19: result.Type = AnimationTypes.Swivel; break;
+                case 42: result.Type = AnimationTypes.Ascend; break;
+                case 3: result.Type = AnimationTypes.Blinds; break;
+                case 4: result.Type = AnimationTypes.Box; break;
+                case 25: result.Type = AnimationTypes.Boomerang; break;
+                case 43: result.Type = AnimationTypes.CenterRevolve; break;
+                case 5: result.Type = AnimationTypes.Checkerboard; break;
+                case 50: result.Type = AnimationTypes.Compress; break;
+                case 7: result.Type = AnimationTypes.TypeEntrance.Equals(commonTimeNode.PresetClass) ? AnimationTypes.CrawlIn : AnimationTypes.CrawlOut; break;
+                case 47: result.Type = AnimationTypes.Descend; break;
+                case 48: result.Type = AnimationTypes.Sling; break;
+                case 29: result.Type = AnimationTypes.TypeEntrance.Equals(commonTimeNode.PresetClass) ? AnimationTypes.EaseIn : AnimationTypes.EaseOut; break;
+                case 55: result.Type = AnimationTypes.TypeEntrance.Equals(commonTimeNode.PresetClass) ? AnimationTypes.Expand : AnimationTypes.Contract; break;
+                case 10: result.Type = AnimationTypes.Fade; break;
+                case 53: result.Type = AnimationTypes.FadedZoom; break;
+                case 11: result.Type = AnimationTypes.FlashOnce; break;
+                case 2: result.Type = AnimationTypes.TypeEntrance.Equals(commonTimeNode.PresetClass) ? AnimationTypes.FlyIn : AnimationTypes.FlyOut; break;
+                case 58: result.Type = AnimationTypes.Fold; break;
+                case 31: result.Type = AnimationTypes.GrowTurn; break;
+                case 12: result.Type = AnimationTypes.TypeEntrance.Equals(commonTimeNode.PresetClass) ? AnimationTypes.PeekIn : AnimationTypes.PeekOut; break;
+                case 16: result.Type = AnimationTypes.Split; break;
+                case 35: result.Type = AnimationTypes.Pinwheel; break;
+                case 14: result.Type = AnimationTypes.RandomBars; break;
+                case 37: result.Type = AnimationTypes.TypeEntrance.Equals(commonTimeNode.PresetClass) ? AnimationTypes.RiseUp : AnimationTypes.SinkDown; break;
+                case 49: result.Type = AnimationTypes.Spinner; break;
+                case 22: result.Type = AnimationTypes.Wipe; break;
+                case 18: result.Type = AnimationTypes.Strips; break;
+                case 26: result.Type = AnimationTypes.Bounce; result.Length = (int)((result.Length * 100) / 29); break;//time tunning
+                case 6: result.Type = AnimationTypes.Circle; break;
+                case 28: result.Type = AnimationTypes.Credits; break;
+                case 52: result.Type = AnimationTypes.TypeEntrance.Equals(commonTimeNode.PresetClass) ? AnimationTypes.CurveUp : AnimationTypes.CurveDown; break;
+                case 8: result.Type = AnimationTypes.Diamond; break;
+                case 9: result.Type = AnimationTypes.Dissolve; break;
+                case 30: result.Type = AnimationTypes.Float; break;
+                case 34: result.Type = AnimationTypes.LightSpeed; result.Length = (int)((result.Length * 5) / 3); break;//time tunning
+                case 51: result.Type = AnimationTypes.Magnify; result.Length = (int)((result.Length * 200) / 77); break;//time tunning
+                case 13: result.Type = AnimationTypes.Plus; break;
+                case 15: result.Type = AnimationTypes.TypeEntrance.Equals(commonTimeNode.PresetClass) ? AnimationTypes.SpiralIn : AnimationTypes.SpiralOut; break;
+                case 17: result.Type = AnimationTypes.Stretch; break;
+                case 39: result.Type = AnimationTypes.Thread; break;
+                case 20: result.Type = AnimationTypes.Wedge; break;
+                case 21: result.Type = AnimationTypes.Wheel; result.AdditionalData = "" + commonTimeNode.PresetSubtype.Value; break;
+                case 23: result.Type = AnimationTypes.Zoom; break;
+                ///补充
+                case 45:result.Type= AnimationTypes.Gyrate; break;
+                case 38: result.Type = AnimationTypes.FallDown; break;
+                case 41: result.Type = AnimationTypes.Whip; break;
+                case 56: result.Type = AnimationTypes.Flip; break;
+                default: Console.WriteLine(commonTimeNode.PresetId.Value + "   "); result.Type = "defaul+" + commonTimeNode.PresetId.Value; return result;
+            }
+
+            return result;
+        }
+        /// <summary>
+        /// 获取强调
+        /// </summary>
+        /// <param name="commonTimeNode"></param>
+        /// <param name="simpleAnim"></param>
+        /// <returns></returns>
+        private EmphasisAnimation HandleEmphasisAnimation(CommonTimeNode commonTimeNode, SimpleAnimation simpleAnim)
+        {
+            EmphasisAnimation result = new EmphasisAnimation(simpleAnim);
+            result.setRgbColor(commonTimeNode, Slide);
+            switch (commonTimeNode.PresetId.Value)  //Presets for Entrance/Exit
+            {
+                case 3: result.Type = AnimationTypes.ChangeFontColor; break;
+                case 19: result.Type = AnimationTypes.ColorBlend; break;
+                case 14: result.Type = AnimationTypes.Blast; break;
+                case 26: result.Type = AnimationTypes.FlashBulb; break;
+                case 35: result.Type = AnimationTypes.Blink; break;
+                case 9:
+                    {
+                        result.Type = AnimationTypes.Transparency;
+                        result.Transparency = getTransparence(commonTimeNode);
+                    }
+                    break;
+                case 20:
+                    {
+                        result.Type = AnimationTypes.ColorWave;
+                        result.Length *= 2;
+                        result.e2 = result.Length / 10;
+                        result.e1 = 2;
+                    }
+                    break;
+                case 16:
+                    {
+                        result.Type = AnimationTypes.BrushOnColor;
+                        result.e2 = result.Length / 25;
+                        result.e1 = 2;
+                    }
+                    break;
+                case 33:
+                    {
+                        result.Type = AnimationTypes.VerticalHighlight;
+                        result.Length *= 2;
+                    }
+                    break;
+                case 27:
+                    {
+                        result.Type = AnimationTypes.Flicker;
+                        result.Length *= 2;
+                    }
+                    break;
+                case 36:
+                    {
+                        result.Type = AnimationTypes.Shimmer;
+                        result.e2 = result.Length / 5;
+                        result.Length *= 2;
+                        foreach (Object obj in commonTimeNode.Descendants())
+                            if (obj.GetType().Equals(typeof(AnimateScale)))
+                            {
+                                ((EmphasisAnimation)result).ScaleX = ((AnimateScale)obj).ToPosition.X.Value / 1000;
+                                ((EmphasisAnimation)result).ScaleY = ((AnimateScale)obj).ToPosition.Y.Value / 1000;
+                                break;
+                            }
+                    }
+                    break;
+                case 28:
+                    {
+                        result.Type = AnimationTypes.GrowwithColor;
+                        result.e2 = result.Length / 10;
+                        result.e1 = 2;
+                    }
+                    break;
+                case 32:
+                    {
+                        result.Type = AnimationTypes.Teeter;
+                        result.Length *= 2;
+                    }
+                    break;
+                case 34:
+                    {
+                        result.Type = AnimationTypes.Wave;
+                        result.e2 = result.Length / 5;
+                        result.Length *= 2;
+                    }
+                    break;
+                case 8:
+                    {
+                        result.Type = AnimationTypes.Spin;
+                        foreach (Object obj in commonTimeNode.Descendants())
+                            if (obj.GetType().Equals(typeof(AnimateRotation)))
+                            {
+                                ((EmphasisAnimation)result).RotationDegrees = ((AnimateRotation)obj).By / 60000;
+                                break;
+                            }
+                    }
+                    break;
+                case 6:
+                    {
+                        result.Type = AnimationTypes.GrowShrink;
+                        foreach (Object obj in commonTimeNode.Descendants())
+                            if (obj.GetType().Equals(typeof(AnimateScale)))
+                            {
+                                ((EmphasisAnimation)result).ScaleX = ((AnimateScale)obj).ByPosition.X.Value / 1000;
+                                ((EmphasisAnimation)result).ScaleY = ((AnimateScale)obj).ByPosition.Y.Value / 1000;
+                                break;
+                            }
+                    }
+                    break;
+                default: result.Type = "defaul+" + commonTimeNode.PresetId.Value; return result;
+            }
+            return result;
+        }
+        private double getTransparence(CommonTimeNode commonTimeNode)
+        {
+            if (typeof(AnimateEffect) == commonTimeNode.LastChild.LastChild.GetType())
+            {
+                AnimateEffect animEffect = (AnimateEffect)commonTimeNode.LastChild.LastChild;
+                string value = animEffect.PropertyList.Value;
+                if (value != null && value.IndexOf("opacity:") != -1)
+                {
+                    string opacityStr = value.Substring(9);//we need 0.75 from "opacity: 0.75"
+                    double opacity = double.Parse(opacityStr, CultureInfo.GetCultureInfo("en-US").NumberFormat);
+                    return 1 - opacity;
+                }
+            }
+
+            return 0;
+        }
+    }
+}

+ 1 - 1
HTEXLib/Animations/EmphasisAnimation.cs

@@ -1,4 +1,4 @@
-using DocumentFormat.OpenXml.Presentation;
+using DocumentFormat.OpenXml.Presentation;
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;

+ 3 - 3
HTEXLib/Animations/JSONGenerator.cs

@@ -456,12 +456,12 @@ namespace HTEXLib.Animations
                 result.InitialState = 3;
                 result.InitialState = 3;
             }
             }
            
            
-            else if (AnimationTypes.verb.Equals(commonTimeNode.PresetClass))
+            else if (AnimationTypes.Verb.Equals(commonTimeNode.PresetClass))
             {
             {
                 ///未用到
                 ///未用到
                 result.InitialState = 4;
                 result.InitialState = 4;
             }
             }
-            else if (AnimationTypes.mediacall.Equals(commonTimeNode.PresetClass))
+            else if (AnimationTypes.Mediacall.Equals(commonTimeNode.PresetClass))
             {
             {
                 ///未用到
                 ///未用到
                 result.InitialState = 5;
                 result.InitialState = 5;
@@ -732,7 +732,7 @@ namespace HTEXLib.Animations
                 case 23: result.Type = AnimationTypes.Zoom; break;
                 case 23: result.Type = AnimationTypes.Zoom; break;
                 ///补充
                 ///补充
                 // case 45:result.Type= AnimationTypes.Zoom; break;
                 // case 45:result.Type= AnimationTypes.Zoom; break;
-                default: result.Type = "defaul+"+ commonTimeNode.PresetId.Value; return result;
+                default:Console.WriteLine(commonTimeNode.PresetId.Value+"   "); result.Type = "defaul+"+ commonTimeNode.PresetId.Value; return result;
             }
             }
 
 
             return result;
             return result;

+ 62 - 4
HTEXLib/Animations/MotionPathAnimation.cs

@@ -9,9 +9,9 @@ using System.Threading.Tasks;
 
 
 namespace HTEXLib.Animations
 namespace HTEXLib.Animations
 {
 {
-    class MotionPathAnimation : SimpleAnimation
+   public class MotionPathAnimation : SimpleAnimation
     {
     {
-        private List<PathPart> motionPath;
+        public List<PathPart> motionPath { get; set; }
         private SlideSize SlideSizes;
         private SlideSize SlideSizes;
         public double MultiplierX()
         public double MultiplierX()
         {
         {
@@ -104,6 +104,64 @@ namespace HTEXLib.Animations
 
 
         }
         }
 
 
+
+        public MotionPathAnimation(CommonTimeNode commonTimeNode, int slideIndex)
+        {
+
+
+            InitialState = 4;
+            timingType = commonTimeNode.NodeType;
+            Type = AnimationTypes.MotionPath;
+            AnimateMotion motion = null;
+            foreach (Object xmlEl in commonTimeNode.Descendants())
+                if (xmlEl.GetType().Equals(typeof(AnimateMotion)))
+                    motion = (AnimateMotion)xmlEl;
+            if (motion == null)
+                return;
+            String path = motion.Path.Value;
+            String[] parts = path.Split();
+            motionPath = new List<PathPart>();
+            int indexPart = -1;
+            bool isX = true;
+            foreach (string part in parts)
+            {
+                if ("".Equals(part) || "E".Equals(part))  //We add our End tag 
+                    continue;
+                Double coords = 0.0;
+                if (!Double.TryParse(part, NumberStyles.Float, CultureInfo.InvariantCulture, out coords))
+                {
+                    isX = true;
+                    if (indexPart >= 0)
+                    {  //FIX FOR POINTS WITH 3 COORDINATES UNTIL WE KNOW WHAT THEY ARE.
+                        List<PathPoint> previousPartPoints = motionPath[indexPart].points;
+                        //if (previousPartPoints[previousPartPoints.Count - 1].Y.CompareTo(0) == 0)
+                           // previousPartPoints.Remove(previousPartPoints[previousPartPoints.Count - 1]);
+                    }
+
+                    indexPart++;
+                    motionPath.Add(new PathPart());
+                    motionPath[indexPart].typeCharacter = part;
+                }
+                else if (isX)
+                {
+                    PathPoint newPoint = new PathPoint();
+                    newPoint.X = coords;
+                    motionPath[indexPart].points.Add(newPoint);   // We have a new point
+                    isX = !isX;
+                }
+                else
+                {
+                    motionPath[indexPart].points[motionPath[indexPart].points.Count - 1].Y = coords;  //Set Y for the last point
+                    isX = !isX;
+                }
+            }
+
+
+            FixAnimationTimings(motion.CommonBehavior, slideIndex);
+            generateAdditionDataString(motionPath);
+
+        }
+
         private void generateAdditionDataString(List<PathPart> motionPath)
         private void generateAdditionDataString(List<PathPart> motionPath)
         {
         {
             double wholeDistance = 0.0;
             double wholeDistance = 0.0;
@@ -150,7 +208,7 @@ namespace HTEXLib.Animations
         }
         }
 
 
 
 
-        private class PathPart
+        public class PathPart
         {
         {
             public string typeCharacter { get; set; }
             public string typeCharacter { get; set; }
             public List<PathPoint> points { get; set; }
             public List<PathPoint> points { get; set; }
@@ -186,7 +244,7 @@ namespace HTEXLib.Animations
         }
         }
 
 
 
 
-        class PathPoint
+      public class PathPoint
         {
         {
             public double X { get; set; }
             public double X { get; set; }
             public double Y { get; set; }
             public double Y { get; set; }

+ 1 - 1
HTEXLib/Controller/HtexController.cs

@@ -180,7 +180,7 @@ namespace HTEXLib.Controller
                 //slide.animations = token;
                 //slide.animations = token;
 
 
 
 
-                var Animations = _mSlide.Animations;
+                var Animations = _mSlide.animtimes;
                 if (Animations != null) {
                 if (Animations != null) {
                     slide.animations = Animations;
                     slide.animations = Animations;
                 }
                 }

+ 157 - 0
HTEXLib/Models/Animtime.cs

@@ -0,0 +1,157 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HTEXLib.Models
+{
+    public abstract class Animtime
+    {
+
+        /// <summary>
+        /// text
+        /// </summary>
+        public string text { get; set; }
+
+        /// <summary>
+        /// targetId
+        /// </summary>
+        public string targetId { get; set; }
+        /// <summary>
+        /// Click Effect "clickEffect".  ClickEffect = 0,
+        /// With Effect "withEffect".  WithEffect = 1,
+        /// After Effect "afterEffect".  AfterEffect = 2,
+        /// Main Sequence "mainSeq".  MainSequence = 3,
+        /// Interactive Sequence "interactiveSeq".  InteractiveSequence = 4,
+        /// Click Paragraph "clickPar".  ClickParagraph = 5,
+        /// With Group "withGroup".  WithGroup = 6,
+        /// After Group "afterGroup".  AfterGroup = 7,
+        /// Timing Root "tmRoot".  TmingRoot = 8
+        /// </summary>
+        public string nodeType { get; set; }
+        /// <summary>
+        /// Id
+        /// </summary>
+        public long id { get; set; }
+        /// <summary>
+        /// PresetClass  动画场景类型
+        /// </summary>
+        public string presetClass { get; set; }
+        /// <summary>
+        /// PresetId 动画Id
+        /// </summary>
+        public string presetId { get; set; }
+        /// <summary>
+        /// PresetId 动画名
+        /// </summary>
+        public string presetName { get; set; }
+        /// <summary>
+        /// PresetSubtype 物件動畫 次樣式 形態 (對應
+        /// </summary>
+        public string presetSubtype { get; set; }
+        /// <summary>
+        /// Acceleration 開始 加速
+        /// </summary>
+        public int accel { get; set; }
+        /// <summary>
+        /// Deceleration 結束 減速
+        /// </summary>
+        public int decel { get; set; }
+        /// <summary>
+        ///  自動反轉 AutoReverse
+        /// </summary>
+        public bool autorev { get; set; }
+        /// <summary>
+        ///  重覆 播放 RepeatCount
+        /// </summary>
+        public string repeat { get; set; }
+        /// <summary>
+        /// RepeatDuration 
+        /// </summary>
+        public string repeatDur { get; set; }
+        /// <summary>
+        /// Duration 
+        /// </summary>
+        public string dur { get; set; }
+        /// <summary>
+        /// 播放速度
+        /// </summary>
+        public Int32 speed { get; set; }
+        /// <summary>
+        /// 動畫播放完成後 之 狀態 Fill   :Remove remove 0 Freeze freeze 1 Hold hold 2   TimeNode Fill Type Enum ( Hold ). Transition transition 3
+        /// </summary>
+        public string fill { get; set; }
+        /// <summary>
+        /// (對應 <p:cTn tmFilter="...">) TimeFilter
+        /// </summary>
+        public string tmfilter { get; set; }
+
+        /// <summary>
+        /// (對應 <p:iterate/p:tmAbs> 
+        /// (預留)  p:tmAbs. TimeAbsolute
+        /// </summary>
+        public string iterate_tmabs { get; set; }
+        /// <summary>
+        /// TimePercentage
+        /// Time Percentage.
+        //     Represents the following element tag in the schema: p:tmPct.
+        ///   <p:iterate/p:tmPct>) 之 % 值
+        /// </summary>
+        public double iterate_tmpct { get; set; }
+        /// <summary>
+        ///  (對應 <p:iterate>) 列舉   Element=0  el,Word=1 wd ,Letter=2 lt
+        /// </summary>
+        public string iterate_type { get; set; }
+        /// <summary>
+        ///  (對應 restart  Restart 列舉   Always=0  always,WhenNotActive=1 whenNotActive  When Not Active ). ,Never=2 never
+        /// </summary>
+        public string restart { get; set; }
+        /// <summary>
+        /// Display
+        /// </summary>
+        public bool display { get; set; }
+        /// <summary>
+        /// GroupId grpId
+        /// </summary>
+        public long groupId { get; set; }
+        /// <summary>
+        /// 
+        /// </summary>
+        public long length { get; set; }
+
+        public TimeCond timeCond { get; set; }
+
+    }
+
+    public class TimeCond {
+        /// <summary>
+        /// None = 0,
+        /// OnBegin = 1,
+        /// OnEnd = 2,
+        /// Begin = 3,
+        /// End = 4,
+        /// OnClick = 5,
+        /// OnDoubleClick = 6,
+        /// OnMouseOver = 7,
+        /// OnMouseOut = 8,
+        /// OnNext = 9,
+        /// OnPrevious = 10,
+        /// OnStopAudio = 11,
+        /// OnMediaBookmark = 12
+        /// </summary>
+        public string Event { get; set; }
+        public int Delay { get; set; }
+        public TgtEl TgtEl { get; set; }
+
+        public int TimeNodeVal { get; set; }
+        /// <summary>
+        /// First = 0,
+        /// Last = 1,
+        /// All = 2
+        /// </summary>
+        public string TrgrRtNode { get; set; }
+    }
+
+    public class TgtEl { 
+    
+    }
+}

+ 280 - 0
HTEXLib/Models/AnimtimeTree.cs

@@ -0,0 +1,280 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HTEXLib.Models
+{
+    /// <summary>
+    /// 物件動畫 時間系列 (animtimetree)
+    /// </summary>
+    public class AnimtimeTree
+    {
+        /// <summary>
+        ///  物件動畫 時間節點 列表 (animnode list)
+        /// </summary>
+        public List<AnimtimeNode> actlst { get; set; }
+        /// <summary>
+        /// 物件(有動畫) 之 對應資訊 列表
+        ///  "Key": "00002",       // *om* // 物件 自訂 uid
+        ///  "Value": objdata      // *om* // 物件(有動畫) 之 對應資訊 (objdata)
+        /// </summary>
+        public Dictionary<string, AnimtimeData> obj_dic { get; set; }
+        /// <summary>
+        /// 是否循序 或 同時
+        /// </summary>
+        public bool seqf { get; set; }
+        /// <summary>
+        ///  物件動畫 時間系列 表列 (animtimetree list)
+        /// </summary>
+        public List<AnimtimeTree> subtreelst { get; set; }
+        /// <summary>
+        ///  物件動畫 時間系列 uid
+        /// </summary>
+        public string tree_id { get; set; }
+    }
+
+    /// <summary>
+    ///  物件(有動畫) 之 對應資訊 (objdata) :
+    /// </summary>
+    public class AnimtimeData
+    {
+        /// <summary>
+        /// 動畫結束後 是否 可見
+        /// </summary>
+        public bool endvisible { get; set; }
+        /// <summary>
+        /// 原始 是否可見
+        /// </summary>
+        public bool orgvisible { get; set; }
+        /// <summary>
+        ///  物件 於 pptx 之 原始 <p:sp/p:nvSpPr/p:cNvPr> id
+        /// </summary>
+        public string obj_spid { get; set; }
+        /// <summary>
+        ///  物件 自訂 uid
+        /// </summary>
+        public string obj_uid { get; set; }
+        /// <summary>
+        /// 對 pptx 物件 之 自訂類別: 0=形狀, 1=文字, m=替換元素 (若是形狀裡有文字, 則會被切成 (0=形狀)+(1=文字) 2 個物件 以組合處理)
+        /// </summary>
+        public string objtypelst { get; set; }
+        /// <summary>
+        /// 位置
+        /// </summary>
+        public Position position { get; set; }
+        /// <summary>
+        /// 原始 不透明值 (0, .., 1)
+        /// </summary>
+        public double orgopaque { get; set; }
+
+
+    }
+    /// <summary>
+    /// 物件動畫 時間節點 (animnode)
+    /// </summary>
+    public class AnimtimeNode {
+
+        /// <summary>
+        /// 開始 加速
+        /// </summary>
+        public int accel { get; set; }
+        /// <summary>
+        ///  物件動畫 變化狀態 表列 (animxchg list)
+        /// </summary>
+        public List<AnimtimeExchange> achglst { get; set; }
+        /// <summary>
+        ///  自動反轉
+        /// </summary>
+        public bool autorev { get; set; }
+        /// <summary>
+        /// 開始之 旋轉角度 (記憶 物件動畫過程後 的 累計旋轉量)
+        /// </summary>
+        public int beg_rot { get; set; }
+        /// <summary>
+        /// 開始之 高 縮放比值 
+        /// </summary>
+        public int begh_scale { get; set; }
+        /// <summary>
+        /// 開始之 寬 縮放比值 
+        /// </summary>
+        public int begw_scale { get; set; }
+        /// <summary>
+        ///  結束 減速
+        /// </summary>
+        public int decel { get; set; }
+        /// <summary>
+        /// 延遲 播放
+        /// </summary>
+        public int delay { get; set; }
+        /// <summary>
+        /// 結束之 旋轉角度 (記憶 物件動畫過程後 的 累計旋轉量)
+        /// </summary>
+        public int end_rot { get; set; }
+        /// <summary>
+        /// 結束之 高 縮放比值 
+        /// </summary>
+        public int endh_scale { get; set; }
+        /// <summary>
+        /// 結束之 寬 縮放比值 
+        /// </summary>
+        public int endw_scale { get; set; }
+        /// <summary>
+        /// path 移動路徑) 之 最後 x 位置(pptx 給 頁面寬之比值)(左上角開始) (只對 path 移動路徑 有效)
+        /// </summary>
+        public int endx_rate { get; set; }
+        /// <summary>
+        /// (path 移動路徑) 之 最後 y 位置(pptx 給 頁面高之比值)(左上角開始) (只對 path 移動路徑 有效)
+        /// </summary>
+        public int endy_rate { get; set; }
+        /// <summary>
+        /// 動畫播放完成後 之 狀態
+        /// </summary>
+        public string fill { get; set; }
+        /// <summary>
+        /// 當 is_accrot > 0 時, 表示 end_rot 值有效 (壘加 旋轉動畫 角度 之用)
+        /// </summary>
+        public int is_accrot { get; set; }
+        /// <summary>
+        /// (預留) 
+        /// </summary>
+        public int iterate_tmabs { get; set; }
+        /// <summary>
+        /// (對應 <p:iterate/p:tmAbs> 和 <p:iterate/p:tmPct>) 之 % 值
+        /// </summary>
+        public double iterate_tmpct { get; set; }
+        /// <summary>
+        ///  (對應 <p:iterate>) 列舉
+        /// </summary>
+        public int iterate_type { get; set; }
+        /// <summary>
+        /// 物件動畫 播放方式: "clickEffect"(按下開始), "withEffect"(和前一動畫同時), "afterEffect"(接在前一動畫之後) (對應 <nodeType>)
+        /// </summary>
+        public int nodetype { get; set; }
+        /// <summary>
+        ///  物件動畫可能所屬 播放群組 id, 對應 <grpId>
+        /// </summary>
+        public int obj_grpid { get; set; }
+        /// <summary>
+        ///  物件 於 pptx 之 原始 <p:sp/p:nvSpPr/p:cNvPr> id
+        /// </summary>
+        public int obj_spid { get; set; }
+        /// <summary>
+        /// 物件 自訂 uid 表列
+        /// </summary>
+        public List<string> obj_uid { get; set; }
+        /// <summary>
+        /// 物件動畫 四大分類: "entr"(進入), "exit"(結束), "emph"(強調), "path"(移動路徑) (對應 <presetClass>)
+        /// </summary>
+        public string presetclass { get; set; }
+        /// <summary>
+        /// 物件動畫 樣式 id (對應 <presetID>)
+        /// </summary>
+        public string presetid { get; set; }
+        /// <summary>
+        /// 物件動畫 次樣式 形態 (對應 <presetSubtype>)
+        /// </summary>
+        public string presetsubtype { get; set; }
+        /// <summary>
+        ///  重覆 播放
+        /// </summary>
+        public int repeat { get; set; }
+    }
+
+    public class AnimtimeExchange {
+        /// <summary>
+        /// 開始 加速
+        /// </summary>
+        public int accel { get; set; }
+        /// <summary>
+        ///  自動反轉
+        /// </summary>
+        public bool autorev { get; set; }
+        /// <summary>
+        /// 結束 減速
+        /// </summary>
+        public int decel { get; set; }
+        /// <summary>
+        /// 延遲 播放
+        /// </summary>
+        public int delay { get; set; }
+        /// <summary>
+        /// 播放時間長度 (秒)
+        /// </summary>
+        public double dur { get; set; }
+        /// <summary>
+        /// 動畫播放完成後 之 狀態
+        /// </summary>
+        public string fill { get; set; }
+        /// <summary>
+        /// 物件動畫 變化狀態名稱 表列 (pptx 於眾多不同地方 設眾多不同值)
+        ///  (HiTeach 白板 除 pptx 給的原始值之外, 目前新增 "內定出現","內定消失", "內定強調", "color", "motion", "scale")
+        /// </summary>
+        public List<string> name_type { get; set; }
+        /// <summary>
+        /// 依 <p:tavLst> 各細項出現的順序, 記錄 相對應的 資料型態 
+        /// </summary>
+        public List<string> newtavl { get; set; }
+        /// <summary>
+        ///  bool 值 表列
+        /// </summary>
+        public bool newvalb { get; set; }
+        /// <summary>
+        /// (string) color 值 表列 (以 string 表示)
+        /// </summary>
+        public string newvalc { get; set; }
+        /// <summary>
+        /// double 值 表列
+        /// </summary>
+        public double newvald { get; set; }
+        /// <summary>
+        /// int 值 表列
+        /// </summary>
+        public int newvali { get; set; }
+        /// <summary>
+        ///  string 值 表列
+        /// </summary>
+        public List<string> newvals { get; set; }
+        /// <summary>
+        ///  (對應 <p:tav fmla="...">) fmla (string) 值 表列 (pptx 複雜動畫公式 會使用, 如:輕彈,猛然挪動,...等)
+        /// </summary>
+        public string tav_fmla_str { get; set; }
+        /// <summary>
+        ///  (對應 <p:tav tm="...">) tm (%) 值 表列 
+        /// </summary>
+        public List<int> tav_tm { get; set; }
+        /// <summary>
+        /// (對應 <p:cTn tmFilter="...">)
+        /// </summary>
+        public string tmfilter { get; set; }
+
+        public string transition { get; set; }
+        /// <summary>
+        /// (對應 <p:txEl/p:charRg st="...">) int 值
+        /// </summary>
+        public int txtcrgbeg { get; set; }
+        /// <summary>
+        ///  (對應 <p:txEl/p:charRg ="...">) int 值
+        /// </summary>
+        public int txtcrgend { get; set; }
+        /// <summary>
+        /// (對應 <p:txEl/p:pRg st="...">) int 值
+        /// </summary>
+        public int txtprgbeg { get; set; }
+        /// <summary>
+        ///  (對應 <p:txEl/p:pRg end="...">) int 值
+        /// </summary>
+        public int txtprgend { get; set; }
+        /// <summary>
+        /// (by) 資料類別+index
+        /// </summary>
+        public string valby { get; set; }
+        /// <summary>
+        /// (from) 資料類別 + index
+        /// </summary>
+        public string valfrom { get; set; }
+        /// <summary>
+        /// (to) 資料類別+index
+        /// </summary>
+        public string valto { get; set; }
+    }
+}

+ 4 - 1
HTEXLib/Models/Border.cs

@@ -4,7 +4,10 @@ using System.Text;
 
 
 namespace HTEXLib
 namespace HTEXLib
 {
 {
-    public  class Border
+    /// <summary>
+    ///  对元素的边框,填充支撑如何
+    /// </summary>
+    public class Border
     {
     {
 
 
         //public double width { get; set; }
         //public double width { get; set; }

+ 7 - 5
HTEXLib/Models/Brush.cs

@@ -1,14 +1,16 @@
+using DocumentFormat.OpenXml.Spreadsheet;
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Text;
 using System.Text;
 
 
 namespace HTEXLib
 namespace HTEXLib
 {
 {
-    public class Brush
+    /// <summary>
+    /// 画笔元素
+    /// </summary>
+    public class Brush : Item
     {
     {
-        public string type { get; set; }
-        public Vector fill { get; set; }
-        public string size { get; set; }
-
+        public string brushType { get; set; }
+        public HTEXLib.Models.HTEX.ShapeStyle style { get; set; } = new Models.HTEX.ShapeStyle();
     }
     }
 }
 }

+ 11 - 0
HTEXLib/Models/EmphAnimtime.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HTEXLib.Models
+{
+    public class EmphAnimtime: Animtime
+    {
+        public string RGBColor { get; set; }
+    }
+}

+ 10 - 0
HTEXLib/Models/EntrAnimtime.cs

@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HTEXLib.Models
+{
+    public class EntrAnimtime: Animtime
+    {
+    }
+}

+ 10 - 0
HTEXLib/Models/ExitAnimtime.cs

@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HTEXLib.Models
+{
+    public class ExitAnimtime: Animtime
+    {
+    }
+}

+ 3 - 0
HTEXLib/Models/Fill.cs

@@ -6,6 +6,9 @@ using System.Text;
 
 
 namespace HTEXLib
 namespace HTEXLib
 {
 {
+    /// <summary>
+    /// 对元素的边框,填充支撑如何
+    /// </summary>
     public class Fill
     public class Fill
     {
     {
 
 

+ 3 - 2
HTEXLib/Models/HTEX/HtexChart.cs

@@ -18,7 +18,7 @@ namespace HTEXLib.Models.HTEX
     {
     {
         public HtexChart(string id, double rot, double width, double height,
         public HtexChart(string id, double rot, double width, double height,
                                    double top, double left, bool invisible,
                                    double top, double left, bool invisible,
-                                   bool animatable, int index, DocumentFormat.OpenXml.Drawing.Charts.ChartReference Chart, PPTSlide slide, string partForm)
+                                   bool animatable, int index, DocumentFormat.OpenXml.Drawing.Charts.ChartReference Chart, PPTSlide slide, string partForm, string timingId)
         {
         {
             base.slide = slide;
             base.slide = slide;
             this.rot = rot;
             this.rot = rot;
@@ -33,6 +33,7 @@ namespace HTEXLib.Models.HTEX
             base.index = index;
             base.index = index;
             base.type = "Chart";
             base.type = "Chart";
             base.partForm = partForm;
             base.partForm = partForm;
+            base.sid = timingId;
         }
         }
         public ChartPart chartPart { get; set; }
         public ChartPart chartPart { get; set; }
         public  string VerticalAlign { get; set; }
         public  string VerticalAlign { get; set; }
@@ -101,7 +102,7 @@ namespace HTEXLib.Models.HTEX
             Shape shape= new Shape { type = "Sp", shapeType = "rect", paragraph = paragraphs };
             Shape shape= new Shape { type = "Sp", shapeType = "rect", paragraph = paragraphs };
             shape.style.fill = shapeStyle != null ? shapeStyle.fill : null;
             shape.style.fill = shapeStyle != null ? shapeStyle.fill : null;
             shape.style.border = shapeStyle != null ? shapeStyle.border : null;
             shape.style.border = shapeStyle != null ? shapeStyle.border : null;
-            var  chart= new Chart { id = this.id,  charts =charts,title=shape};
+            var  chart= new Chart {sid=sid, id = this.id,  charts =charts,title=shape};
             Position position = new Position { cx = width, cy = height, x = left, y = top, rot = rot };
             Position position = new Position { cx = width, cy = height, x = left, y = top, rot = rot };
             chart.style.position = position;
             chart.style.position = position;
             chart.style.fill = shapeStyleChart != null ? shapeStyleChart.fill : null;
             chart.style.fill = shapeStyleChart != null ? shapeStyleChart.fill : null;

+ 3 - 2
HTEXLib/Models/HTEX/HtexConnectionShape.cs

@@ -10,8 +10,9 @@ namespace HTEXLib.Models.HTEX
     {
     {
         public Inner.PPTConnectionShape connectionShape { get; set; }
         public Inner.PPTConnectionShape connectionShape { get; set; }
         public HtexConnectionShape(string id, double rot, double width, double height,
         public HtexConnectionShape(string id, double rot, double width, double height,
-                  double top, double left, bool invisible, bool animatable, int index, Inner.PPTConnectionShape connectionShape, PPTSlide slide, string partForm)
+                  double top, double left, bool invisible, bool animatable, int index, Inner.PPTConnectionShape connectionShape, PPTSlide slide, string partForm, string timingId)
         {
         {
+            base.sid = timingId;
             base.slide = slide;
             base.slide = slide;
             this.rot = rot;
             this.rot = rot;
             this.connectionShape = connectionShape;
             this.connectionShape = connectionShape;
@@ -65,7 +66,7 @@ namespace HTEXLib.Models.HTEX
             }
             }
             Svg svg = PPTXSvg.GenShapeSvg(connectionShape.element, index, shapeType, position,   shapeBorder);
             Svg svg = PPTXSvg.GenShapeSvg(connectionShape.element, index, shapeType, position,   shapeBorder);
             //  position = position ,mediaType = "image",type = type,index = index,animatable = animatable ,invisible = invisible
             //  position = position ,mediaType = "image",type = type,index = index,animatable = animatable ,invisible = invisible
-            Connector item = new Connector { type=type,cxnType=shapeType, invisible = invisible, animatable = animatable, index = index, id = id, svg = svg };
+            Connector item = new Connector { sid =sid, type =type,cxnType=shapeType, invisible = invisible, animatable = animatable, index = index, id = id, svg = svg };
             item.style.position = position;
             item.style.position = position;
             item.style.border = shapeBorder;
             item.style.border = shapeBorder;
             item.uid = connectionShape.suid;
             item.uid = connectionShape.suid;

+ 3 - 1
HTEXLib/Models/HTEX/HtexDiagram.cs

@@ -9,8 +9,9 @@ namespace HTEXLib.Models.HTEX
     {
     {
         public HtexDiagram(string id, double rot, double width, double height,
         public HtexDiagram(string id, double rot, double width, double height,
                                  double top, double left, bool invisible,
                                  double top, double left, bool invisible,
-                                 bool animatable, int index, DocumentFormat.OpenXml.Drawing.Diagrams.RelationshipIds Diagram, PPTSlide slide, string partForm)
+                                 bool animatable, int index, DocumentFormat.OpenXml.Drawing.Diagrams.RelationshipIds Diagram, PPTSlide slide, string partForm, string timingId)
         {
         {
+            base.sid = timingId;
             base.slide = slide;
             base.slide = slide;
             this.rot = rot;
             this.rot = rot;
             this.Diagram = Diagram;
             this.Diagram = Diagram;
@@ -34,6 +35,7 @@ namespace HTEXLib.Models.HTEX
 
 
         private void DoDiagram()
         private void DoDiagram()
         {
         {
+            new Diagram { sid = sid };
             //datapart r:dm="rId2" layoutpart r:lo="rId3"  stylepart r:qs="rId4" colorpart r:cs="rId5" />
             //datapart r:dm="rId2" layoutpart r:lo="rId3"  stylepart r:qs="rId4" colorpart r:cs="rId5" />
             var DataPart = Diagram.DataPart.Value;
             var DataPart = Diagram.DataPart.Value;
             var LayoutPart = Diagram.LayoutPart.Value;
             var LayoutPart = Diagram.LayoutPart.Value;

+ 1 - 0
HTEXLib/Models/HTEX/HtexElement.cs

@@ -28,5 +28,6 @@ namespace HTEXLib.Models.HTEX
         public int flipV { get; set; } = 0;
         public int flipV { get; set; } = 0;
         public abstract List<Item> DrawElement();
         public abstract List<Item> DrawElement();
         public string partForm { get; set; }
         public string partForm { get; set; }
+        public string sid { get; set; }
     }
     }
 }
 }

+ 5 - 4
HTEXLib/Models/HTEX/HtexGraphicFrame.cs

@@ -17,9 +17,10 @@ namespace HTEXLib.Models.HTEX
     {
     {
         public HtexGraphicFrame(string id, double rot, double width, double height,
         public HtexGraphicFrame(string id, double rot, double width, double height,
                                double top, double left, bool invisible,
                                double top, double left, bool invisible,
-                               bool animatable, int index, Inner.PPTGraphicFrame graphicFrame, PPTSlide slide, string partForm)
+                               bool animatable, int index, Inner.PPTGraphicFrame graphicFrame, PPTSlide slide, string partForm, string timingId)
         // frameId, width, height, top, left, visible, animatable
         // frameId, width, height, top, left, visible, animatable
         {
         {
+            base.sid = timingId;
             base.slide = slide;
             base.slide = slide;
             this.rot = rot;
             this.rot = rot;
             this.graphicFrame = graphicFrame;
             this.graphicFrame = graphicFrame;
@@ -43,17 +44,17 @@ namespace HTEXLib.Models.HTEX
           
           
             foreach (var clild in GraphicDataChildren) {
             foreach (var clild in GraphicDataChildren) {
                 if (clild is DocumentFormat.OpenXml.Drawing.Table Table) {
                 if (clild is DocumentFormat.OpenXml.Drawing.Table Table) {
-                    HtexTable table = new HtexTable(id,rot,width,height,top,left,invisible,animatable,index,Table,slide,partForm);
+                    HtexTable table = new HtexTable(id,rot,width,height,top,left,invisible,animatable,index,Table,slide,partForm,sid);
                     items= table.DrawElement();
                     items= table.DrawElement();
                 }
                 }
                 if (clild is DocumentFormat.OpenXml.Drawing.Charts.ChartReference Chart)
                 if (clild is DocumentFormat.OpenXml.Drawing.Charts.ChartReference Chart)
                 {
                 {
-                    HtexChart chart = new HtexChart(id, rot, width, height, top, left, invisible, animatable, index, Chart, slide, partForm);
+                    HtexChart chart = new HtexChart(id, rot, width, height, top, left, invisible, animatable, index, Chart, slide, partForm,sid);
                     items = chart.DrawElement();
                     items = chart.DrawElement();
                 }
                 }
                 if (clild is DocumentFormat.OpenXml.Drawing.Diagrams.RelationshipIds Diagram)
                 if (clild is DocumentFormat.OpenXml.Drawing.Diagrams.RelationshipIds Diagram)
                 {
                 {
-                    HtexDiagram diagram = new HtexDiagram(id, rot, width, height, top, left, invisible, animatable, index, Diagram, slide, partForm);
+                    HtexDiagram diagram = new HtexDiagram(id, rot, width, height, top, left, invisible, animatable, index, Diagram, slide, partForm,sid);
                     items = diagram.DrawElement();
                     items = diagram.DrawElement();
                   
                   
                 }
                 }

+ 3 - 2
HTEXLib/Models/HTEX/HtexGroupShape.cs

@@ -9,8 +9,9 @@ namespace HTEXLib.Models.HTEX
     {
     {
         public HtexGroupShape(string id, double rot, double width, double height,
         public HtexGroupShape(string id, double rot, double width, double height,
                          double top, double left, bool invisible,
                          double top, double left, bool invisible,
-                         bool animatable, int index, Inner.PPTGroupShape groupShape, PPTSlide slide, string partForm)
+                         bool animatable, int index, Inner.PPTGroupShape groupShape, PPTSlide slide, string partForm, string timingId)
         {
         {
+            base.sid = timingId;
             base.slide = slide;
             base.slide = slide;
             this.rot = rot;
             this.rot = rot;
             this.groupShape = groupShape;
             this.groupShape = groupShape;
@@ -30,7 +31,7 @@ namespace HTEXLib.Models.HTEX
         {
         {
             Position position = new Position { cx = width, cy = height, x = left, y = top, rot = rot };
             Position position = new Position { cx = width, cy = height, x = left, y = top, rot = rot };
             var ShapeStyle = PPTXHelper.DoShapeProperties(groupShape.element.GroupShapeProperties, slide, type, partForm);
             var ShapeStyle = PPTXHelper.DoShapeProperties(groupShape.element.GroupShapeProperties, slide, type, partForm);
-            Group group = new Group() { id = this.id, type = type, index = index, animatable = animatable, invisible = invisible };
+            Group group = new Group() { sid = sid,id = this.id, type = type, index = index, animatable = animatable, invisible = invisible };
             group.style.border = ShapeStyle.border;
             group.style.border = ShapeStyle.border;
             group.style.fill = ShapeStyle.fill;
             group.style.fill = ShapeStyle.fill;
             group.style.position = position;
             group.style.position = position;

+ 3 - 2
HTEXLib/Models/HTEX/HtexImage.cs

@@ -13,8 +13,9 @@ namespace HTEXLib.Models.HTEX
         public string FileExtension { get; set; }
         public string FileExtension { get; set; }
         public HtexImage(string id, double rot, double width, double height,
         public HtexImage(string id, double rot, double width, double height,
                           double top, double left, bool invisible,
                           double top, double left, bool invisible,
-                          bool animatable, string extension,int index, Inner.PPTImage image, PPTSlide slide, string partForm)
+                          bool animatable, string extension,int index, Inner.PPTImage image, PPTSlide slide, string partForm, string timingId)
         {
         {
+            base.sid = timingId;
             base.slide = slide;
             base.slide = slide;
             this.rot = rot;
             this.rot = rot;
             this.image = image;
             this.image = image;
@@ -35,7 +36,7 @@ namespace HTEXLib.Models.HTEX
         { 
         { 
             Position position = new Position { cx = width, cy = height, x = left, y = top, rot = rot };
             Position position = new Position { cx = width, cy = height, x = left, y = top, rot = rot };
             var ShapeStyle = PPTXHelper.DoShapeProperties(image.element.ShapeProperties, slide,type,partForm);
             var ShapeStyle = PPTXHelper.DoShapeProperties(image.element.ShapeProperties, slide,type,partForm);
-            Media media = new Media() { id = this.id, mediaType = "image",type=type,index=index,animatable=animatable ,invisible=invisible};
+            Media media = new Media() { sid = sid, id = this.id, mediaType = "image",type=type,index=index,animatable=animatable ,invisible=invisible};
             media.style.position = position;
             media.style.position = position;
             /*
             /*
              *  cNvPicPr (非可视图片绘图属性)	§19.3.1.11
              *  cNvPicPr (非可视图片绘图属性)	§19.3.1.11

+ 5 - 3
HTEXLib/Models/HTEX/HtexMath.cs

@@ -22,7 +22,9 @@ namespace HTEXLib.Models.HTEX
         private int slideIndex;
         private int slideIndex;
         public HtexMath(string id, double rot, double width, double height,
         public HtexMath(string id, double rot, double width, double height,
                            double top, double left, bool invisible,
                            double top, double left, bool invisible,
-                           bool animatable, int slideIndex, int index, PPTMath shape, PPTSlide slide, string partForm) {
+                           bool animatable, int slideIndex, int index, PPTMath shape, PPTSlide slide, string partForm, string timingId)
+        {
+            base.sid = timingId;
             base.slide = slide;
             base.slide = slide;
             this.rot = rot;
             this.rot = rot;
             this.pptMath = shape;
             this.pptMath = shape;
@@ -43,7 +45,7 @@ namespace HTEXLib.Models.HTEX
             Position position = new Position { cx = width, cy = height, x = left, y = top, rot = rot };
             Position position = new Position { cx = width, cy = height, x = left, y = top, rot = rot };
             var ShapeStyle = PPTXHelper.DoShapeProperties(pptMath.element.ShapeProperties, slide, type, partForm);
             var ShapeStyle = PPTXHelper.DoShapeProperties(pptMath.element.ShapeProperties, slide, type, partForm);
             var shapeTypeNode = pptMath.element.ShapeProperties.GetFirstChild<PresetGeometry>();
             var shapeTypeNode = pptMath.element.ShapeProperties.GetFirstChild<PresetGeometry>();
-            Math math = new Math { id = this.id, type = type, index = index, animatable = animatable, invisible = invisible };
+            Math math = new Math { sid = sid, id = this.id, type = type, index = index, animatable = animatable, invisible = invisible };
             math.style.position = position;
             math.style.position = position;
             SlideColor slideColor = PPTXHelper.DoShapeStyle(pptMath.element.ShapeStyle, slide, type);
             SlideColor slideColor = PPTXHelper.DoShapeStyle(pptMath.element.ShapeStyle, slide, type);
             //从ShapeProperties 获取 p:spPr
             //从ShapeProperties 获取 p:spPr
@@ -148,7 +150,7 @@ namespace HTEXLib.Models.HTEX
                 bool animatable = baseShape.Animatable;
                 bool animatable = baseShape.Animatable;
                 string clickLinkUrl = baseShape.ClickLinkUrl;
                 string clickLinkUrl = baseShape.ClickLinkUrl;
                 HtexShape htmlShape = new HtexShape(Id, rot, width, height, top,
                 HtexShape htmlShape = new HtexShape(Id, rot, width, height, top,
-                                                        left, invisible, animatable, slideIndex, index, baseShape, slide, baseShape.PartForm)
+                                                        left, invisible, animatable, slideIndex, index, baseShape, slide, baseShape.PartForm,sid)
                 {
                 {
                     Shape = baseShape,
                     Shape = baseShape,
                     //rot = baseShape.VisualShapeProp.Rotate,
                     //rot = baseShape.VisualShapeProp.Rotate,

+ 3 - 2
HTEXLib/Models/HTEX/HtexShape.cs

@@ -18,8 +18,9 @@ namespace HTEXLib.Models.HTEX
 
 
         public HtexShape(string id, double rot, double width, double height,
         public HtexShape(string id, double rot, double width, double height,
                            double top, double left, bool invisible,
                            double top, double left, bool invisible,
-                           bool animatable, int slideIndex, int index, PPTShape shape, PPTSlide slide, string partForm)
+                           bool animatable, int slideIndex, int index, PPTShape shape, PPTSlide slide, string partForm, string timingId)
         {
         {
+            base.sid = timingId;
             base.slide = slide;
             base.slide = slide;
             this.rot = rot;
             this.rot = rot;
             this.Shape = shape;
             this.Shape = shape;
@@ -47,7 +48,7 @@ namespace HTEXLib.Models.HTEX
             Position position = new Position { cx= width, cy= height, x=left,y=top,rot=rot};
             Position position = new Position { cx= width, cy= height, x=left,y=top,rot=rot};
             var ShapeStyle =PPTXHelper.DoShapeProperties(Shape.element.ShapeProperties, slide,type,partForm);
             var ShapeStyle =PPTXHelper.DoShapeProperties(Shape.element.ShapeProperties, slide,type,partForm);
             //position = position ,mediaType = "image",type = type,index = index,animatable = animatable ,invisible = invisible
             //position = position ,mediaType = "image",type = type,index = index,animatable = animatable ,invisible = invisible
-            Shape shape = new Shape() {id=this.id, paragraph = DrawText() ,type=type,index=index,animatable=animatable,invisible=invisible };
+            Shape shape = new Shape() { sid = sid, id =this.id, paragraph = DrawText() ,type=type,index=index,animatable=animatable,invisible=invisible };
             shape.style.position = position;
             shape.style.position = position;
             var shapeTypeNode = Shape.element.ShapeProperties.GetFirstChild<PresetGeometry>();
             var shapeTypeNode = Shape.element.ShapeProperties.GetFirstChild<PresetGeometry>();
             var shapeTypeCustom = Shape.element.ShapeProperties.GetFirstChild<CustomGeometry>();
             var shapeTypeCustom = Shape.element.ShapeProperties.GetFirstChild<CustomGeometry>();

+ 18 - 18
HTEXLib/Models/HTEX/HtexSlide.cs

@@ -98,14 +98,14 @@ namespace HTEXLib.Models.HTEX
                     if (FromGroup)
                     if (FromGroup)
                     {
                     {
                         HtexGraphicFrame htmlSmartArt = new HtexGraphicFrame(Id, rot, width, height, top,
                         HtexGraphicFrame htmlSmartArt = new HtexGraphicFrame(Id, rot, width, height, top,
-                                                               left, invisible, animatable, index, graphicFrame, slide, baseShape.PartForm);
+                                                               left, invisible, animatable, index, graphicFrame, slide, baseShape.PartForm, TimingId);
                         items = htmlSmartArt.DrawElement();
                         items = htmlSmartArt.DrawElement();
                     }
                     }
                 }
                 }
                 else
                 else
                 {
                 {
                     HtexGraphicFrame htmlSmartArt = new HtexGraphicFrame(Id, rot, width, height, top,
                     HtexGraphicFrame htmlSmartArt = new HtexGraphicFrame(Id, rot, width, height, top,
-                                                            left, invisible, animatable, index, graphicFrame, slide, baseShape.PartForm);
+                                                            left, invisible, animatable, index, graphicFrame, slide,  baseShape.PartForm, TimingId);
                     items = htmlSmartArt.DrawElement();
                     items = htmlSmartArt.DrawElement();
                 }
                 }
 
 
@@ -117,14 +117,14 @@ namespace HTEXLib.Models.HTEX
                     if (FromGroup)
                     if (FromGroup)
                     {
                     {
                         HtexGroupShape htmlShape = new HtexGroupShape(Id, rot, width, height, top,
                         HtexGroupShape htmlShape = new HtexGroupShape(Id, rot, width, height, top,
-                                                                left, invisible, animatable, index, groupShape, slide, baseShape.PartForm);
+                                                                left, invisible, animatable, index, groupShape, slide,  baseShape.PartForm, TimingId);
                         items = htmlShape.DrawElement();
                         items = htmlShape.DrawElement();
                     }
                     }
                 }
                 }
                 else
                 else
                 {
                 {
                     HtexGroupShape htmlShape = new HtexGroupShape(Id, rot, width, height, top,
                     HtexGroupShape htmlShape = new HtexGroupShape(Id, rot, width, height, top,
-                                                            left, invisible, animatable, index, groupShape, slide, baseShape.PartForm);
+                                                            left, invisible, animatable, index, groupShape, slide,  baseShape.PartForm, TimingId);
                     items = htmlShape.DrawElement();
                     items = htmlShape.DrawElement();
                 }
                 }
             }
             }
@@ -136,7 +136,7 @@ namespace HTEXLib.Models.HTEX
                     {
                     {
                         HtexConnectionShape htmlShape =
                         HtexConnectionShape htmlShape =
                       new HtexConnectionShape(Id, rot, width, height, top,
                       new HtexConnectionShape(Id, rot, width, height, top,
-                                              left, invisible, animatable, index, connectionShape, slide, baseShape.PartForm);
+                                              left, invisible, animatable, index, connectionShape, slide,  baseShape.PartForm, TimingId);
                         items = htmlShape.DrawElement();
                         items = htmlShape.DrawElement();
                     }
                     }
                 }
                 }
@@ -144,7 +144,7 @@ namespace HTEXLib.Models.HTEX
                 {
                 {
                     HtexConnectionShape htmlShape =
                     HtexConnectionShape htmlShape =
                         new HtexConnectionShape(Id, rot, width, height, top,
                         new HtexConnectionShape(Id, rot, width, height, top,
-                                                left, invisible, animatable, index, connectionShape, slide, baseShape.PartForm);
+                                                left, invisible, animatable, index, connectionShape, slide,  baseShape.PartForm, TimingId);
                     items = htmlShape.DrawElement();
                     items = htmlShape.DrawElement();
                 }
                 }
 
 
@@ -156,7 +156,7 @@ namespace HTEXLib.Models.HTEX
                     if (FromGroup)
                     if (FromGroup)
                     {
                     {
                         HtexShape htmlShape = new HtexShape(Id, rot, width, height, top,
                         HtexShape htmlShape = new HtexShape(Id, rot, width, height, top,
-                                                            left, invisible, animatable, slideIndex, index, shape, slide, baseShape.PartForm)
+                                                            left, invisible, animatable, slideIndex, index, shape, slide, baseShape.PartForm, TimingId)
                         {
                         {
                             Shape = shape,
                             Shape = shape,
                             //rot = baseShape.VisualShapeProp.Rotate,
                             //rot = baseShape.VisualShapeProp.Rotate,
@@ -168,7 +168,7 @@ namespace HTEXLib.Models.HTEX
                 else
                 else
                 {
                 {
                     HtexShape htmlShape = new HtexShape(Id, rot, width, height, top,
                     HtexShape htmlShape = new HtexShape(Id, rot, width, height, top,
-                                                        left, invisible, animatable, slideIndex, index, shape, slide, baseShape.PartForm)
+                                                        left, invisible, animatable, slideIndex, index, shape, slide,  baseShape.PartForm, TimingId)
                     {
                     {
                         Shape = shape,
                         Shape = shape,
                         //rot = baseShape.VisualShapeProp.Rotate,
                         //rot = baseShape.VisualShapeProp.Rotate,
@@ -185,7 +185,7 @@ namespace HTEXLib.Models.HTEX
                     if (FromGroup)
                     if (FromGroup)
                     {
                     {
                         HtexImage htmlImage = new HtexImage(Id, rot, width, height,
                         HtexImage htmlImage = new HtexImage(Id, rot, width, height,
-                                                     top, left, invisible, animatable, image.FileExtension, index, image, slide, baseShape.PartForm)
+                                                     top, left, invisible, animatable, image.FileExtension, index, image, slide,  baseShape.PartForm, TimingId)
                         {
                         {
                             HyperLink = clickLinkUrl
                             HyperLink = clickLinkUrl
                         };
                         };
@@ -195,7 +195,7 @@ namespace HTEXLib.Models.HTEX
                 else
                 else
                 {
                 {
                     HtexImage htmlImage = new HtexImage(Id, rot, width, height,
                     HtexImage htmlImage = new HtexImage(Id, rot, width, height,
-                                                       top, left, invisible, animatable, image.FileExtension, index, image, slide, baseShape.PartForm)
+                                                       top, left, invisible, animatable, image.FileExtension, index, image, slide,  baseShape.PartForm, TimingId)
                     {
                     {
                         HyperLink = clickLinkUrl
                         HyperLink = clickLinkUrl
                     };
                     };
@@ -211,7 +211,7 @@ namespace HTEXLib.Models.HTEX
                     if (FromGroup)
                     if (FromGroup)
                     {
                     {
                         HtexMath htexMath = new HtexMath(Id, rot, width, height, top,
                         HtexMath htexMath = new HtexMath(Id, rot, width, height, top,
-                                                          left, invisible, animatable, slideIndex, index, math, slide, baseShape.PartForm)
+                                                          left, invisible, animatable, slideIndex, index, math, slide,  baseShape.PartForm, TimingId)
                         {
                         {
                             pptMath = math,
                             pptMath = math,
                             HyperLink = clickLinkUrl
                             HyperLink = clickLinkUrl
@@ -222,7 +222,7 @@ namespace HTEXLib.Models.HTEX
                 else
                 else
                 {
                 {
                     HtexMath htexMath = new HtexMath(Id, rot, width, height, top,
                     HtexMath htexMath = new HtexMath(Id, rot, width, height, top,
-                                                     left, invisible, animatable, slideIndex, index, math, slide, baseShape.PartForm)
+                                                     left, invisible, animatable, slideIndex, index, math, slide,  baseShape.PartForm, TimingId)
                     {
                     {
                         pptMath = math,
                         pptMath = math,
                         HyperLink = clickLinkUrl
                         HyperLink = clickLinkUrl
@@ -235,7 +235,7 @@ namespace HTEXLib.Models.HTEX
                 {
                 {
                     if (FromGroup)
                     if (FromGroup)
                     {
                     {
-                        HtexTable HtexTable = new HtexTable(Id, rot, width, height, top, left, invisible, animatable, index, table.element, slide, baseShape.PartForm);
+                        HtexTable HtexTable = new HtexTable(Id, rot, width, height, top, left, invisible, animatable, index, table.element, slide,  baseShape.PartForm, TimingId);
                        
                        
                         items = HtexTable.DrawElement();
                         items = HtexTable.DrawElement();
                         
                         
@@ -243,7 +243,7 @@ namespace HTEXLib.Models.HTEX
                 }
                 }
                 else
                 else
                 {
                 {
-                    HtexTable HtexTable = new HtexTable(Id, rot, width, height, top, left, invisible, animatable, index, table.element, slide, baseShape.PartForm); 
+                    HtexTable HtexTable = new HtexTable(Id, rot, width, height, top, left, invisible, animatable, index, table.element, slide,  baseShape.PartForm, TimingId); 
                     items = HtexTable.DrawElement();
                     items = HtexTable.DrawElement();
                 }
                 }
                 if (items != null && items.Count > 0)
                 if (items != null && items.Count > 0)
@@ -258,13 +258,13 @@ namespace HTEXLib.Models.HTEX
                 {
                 {
                     if (FromGroup)
                     if (FromGroup)
                     {
                     {
-                        HtexChart HtexChart = new HtexChart(Id, rot, width, height, top, left, invisible, animatable, index, Chart.element, slide, baseShape.PartForm);
+                        HtexChart HtexChart = new HtexChart(Id, rot, width, height, top, left, invisible, animatable, index, Chart.element, slide,  baseShape.PartForm, TimingId);
                         items = HtexChart.DrawElement();
                         items = HtexChart.DrawElement();
                     }
                     }
                 }
                 }
                 else
                 else
                 {
                 {
-                    HtexChart HtexChart = new HtexChart(Id, rot, width, height, top, left, invisible, animatable, index, Chart.element, slide, baseShape.PartForm);
+                    HtexChart HtexChart = new HtexChart(Id, rot, width, height, top, left, invisible, animatable, index, Chart.element, slide,  baseShape.PartForm, TimingId);
                     items = HtexChart.DrawElement();
                     items = HtexChart.DrawElement();
                 }
                 }
                 if (items != null && items.Count > 0)
                 if (items != null && items.Count > 0)
@@ -279,13 +279,13 @@ namespace HTEXLib.Models.HTEX
                 {
                 {
                     if (FromGroup)
                     if (FromGroup)
                     {
                     {
-                        HtexDiagram HtexChart = new HtexDiagram(Id, rot, width, height, top, left, invisible, animatable, index, Diagram.element, slide, baseShape.PartForm);
+                        HtexDiagram HtexChart = new HtexDiagram(Id, rot, width, height, top, left, invisible, animatable, index, Diagram.element, slide,  baseShape.PartForm, TimingId);
                         items = HtexChart.DrawElement();
                         items = HtexChart.DrawElement();
                     }
                     }
                 }
                 }
                 else
                 else
                 {
                 {
-                    HtexDiagram HtexChart = new HtexDiagram(Id, rot, width, height, top, left, invisible, animatable, index, Diagram.element, slide, baseShape.PartForm);
+                    HtexDiagram HtexChart = new HtexDiagram(Id, rot, width, height, top, left, invisible, animatable, index, Diagram.element, slide,  baseShape.PartForm, TimingId);
                     items = HtexChart.DrawElement();
                     items = HtexChart.DrawElement();
                 }
                 }
                 if (items != null && items.Count > 0)
                 if (items != null && items.Count > 0)

+ 4 - 2
HTEXLib/Models/HTEX/HtexTable.cs

@@ -17,7 +17,9 @@ namespace HTEXLib.Models.HTEX
     {
     {
         public HtexTable(string id, double rot, double width, double height,
         public HtexTable(string id, double rot, double width, double height,
                                double top, double left, bool invisible,
                                double top, double left, bool invisible,
-                               bool animatable, int index, DocumentFormat.OpenXml.Drawing.Table table, PPTSlide slide, string partForm) {
+                               bool animatable, int index, DocumentFormat.OpenXml.Drawing.Table table, PPTSlide slide, string partForm, string timingId)
+        {
+            base.sid = timingId;
             base.slide = slide;
             base.slide = slide;
             this.rot = rot;
             this.rot = rot;
             this.Table = table;
             this.Table = table;
@@ -39,7 +41,7 @@ namespace HTEXLib.Models.HTEX
             tbStyle.ColumnWidth = columns.Select(x => x.Width * Globals.px96 * 1.0 / Globals.px914400).ToList();
             tbStyle.ColumnWidth = columns.Select(x => x.Width * Globals.px96 * 1.0 / Globals.px914400).ToList();
             List<TableRow> rows = Table.Elements<TableRow>().ToList();
             List<TableRow> rows = Table.Elements<TableRow>().ToList();
             var trs = DoTableRow(rows, slide, type, partForm);
             var trs = DoTableRow(rows, slide, type, partForm);
-            Table table = new Table() { id = this.id, tr = trs, style = tbStyle, type =type, index = index, animatable = animatable, invisible = invisible };
+            Table table = new Table() { sid = sid,id = this.id, tr = trs, style = tbStyle, type =type, index = index, animatable = animatable, invisible = invisible };
             table.style.position = position;
             table.style.position = position;
             var elmt = new List<Item>();
             var elmt = new List<Item>();
             elmt.Add(table);
             elmt.Add(table);

+ 66 - 22
HTEXLib/Models/PPTX/PPTSlide.cs

@@ -41,14 +41,32 @@ namespace HTEXLib.Models
             }
             }
             Transition = JSONGenerator.GenerateTransitionAnimationObject(transition);
             Transition = JSONGenerator.GenerateTransitionAnimationObject(transition);
             Animations = new List<IAnimation>();
             Animations = new List<IAnimation>();
-            AddAnimations(openXmlPart.Slide.Timing, Animations, SlideSizes);
-            AddTimings(openXmlPart.Slide.Timing, Animations, SlideSizes);
+
+             animtimes = new List<Animtime>();
+          //  AddAnimations(openXmlPart.Slide.Timing, Animations, SlideSizes);
+           // AddAnimations(openXmlPart.SlideLayoutPart.SlideLayout.Timing, Animations, SlideSizes);
+          //  AddAnimations(slideMasterPart.SlideMaster.Timing, Animations, SlideSizes);
+            //播放母版的动画
+            AddTimings(slideMasterPart.SlideMaster.Timing, animtimes, SlideSizes);
+            //播放样式表的动画
+            AddTimings(openXmlPart.SlideLayoutPart.SlideLayout.Timing, animtimes, SlideSizes);
+            //播放单页动画
+            AddTimings(openXmlPart.Slide.Timing, animtimes, SlideSizes);
+
+            List<NonVisualDrawingProperties> nonVisualDrawingProperties = ((SlidePart)this.SlidePart).Slide.Descendants<NonVisualDrawingProperties>().ToList();
+
+            animtimes.ForEach(x => {
+                NonVisualDrawingProperties nonVisualDrawing= nonVisualDrawingProperties.Where(y => y.Id == x.targetId).FirstOrDefault();
+                if (nonVisualDrawing != null) {
+                    x.text = nonVisualDrawing.Parent.Parent.InnerText;
+                }
+            });
+
             //TODO 处理layout 及 master 的 Transition Timing。
             //TODO 处理layout 及 master 的 Transition Timing。
-            IAnimation transition_animation;
-            IAnimation slide_transition =  AddTransition(openXmlPart.Slide.Transition, "slide");
-            
-            IAnimation layout_transition = AddTransition(openXmlPart.SlideLayoutPart.SlideLayout.Transition, "layout");
-            IAnimation master_transition = AddTransition(slideMasterPart.SlideMaster.Transition, "master");
+            //master 和 layout 过渡效果直接覆盖给slide
+            IAnimation transition_animation =  AddTransition(openXmlPart.Slide.Transition, "slide");
+            //  IAnimation layout_transition = AddTransition(openXmlPart.SlideLayoutPart.SlideLayout.Transition, "layout");
+            //  IAnimation master_transition = AddTransition(slideMasterPart.SlideMaster.Transition, "master");
             
             
         }
         }
 
 
@@ -76,6 +94,7 @@ namespace HTEXLib.Models
         public PPTContainerShape ContainerShape { get; set; } = new PPTContainerShape();
         public PPTContainerShape ContainerShape { get; set; } = new PPTContainerShape();
         public TextStyles textStyles { get; set; }
         public TextStyles textStyles { get; set; }
         public SlideLayoutPart SlideLayoutPart { get; set; }
         public SlideLayoutPart SlideLayoutPart { get; set; }
+        public List<Animtime> animtimes { get; set; }
         public List<IAnimation> Animations { get; set; }
         public List<IAnimation> Animations { get; set; }
         public string Id { get; set; }
         public string Id { get; set; }
         public IAnimation Transition { get; set; }
         public IAnimation Transition { get; set; }
@@ -168,10 +187,35 @@ namespace HTEXLib.Models
         }
         }
 
 
 
 
-        private void AddTimings(OpenXmlCompositeElement element, List<IAnimation> animations, SlideSize slideSizes)
+        private void AddTimings(OpenXmlCompositeElement element, List<Animtime> resultList, SlideSize SlideSizes)
         {
         {
             if (element == null)
             if (element == null)
                 return;
                 return;
+            Animtime animationForThisNode = null;
+            if (element.GetType().Equals(typeof(CommonTimeNode)))
+            {
+                
+                CommonTimeNode node = (CommonTimeNode)element;
+                animationForThisNode = new AnimtimeGenerator(this).GetAnimtimeByCommonTimeNode(node);
+                if (animationForThisNode != null) {
+
+                    
+                    resultList.Add(animationForThisNode);
+                }
+            }
+            foreach (OpenXmlElement obj in element.ChildElements)
+            {
+                if (obj.GetType().IsSubclassOf(typeof(OpenXmlCompositeElement)))
+                {
+                    if (animationForThisNode == null)
+                        AddTimings((OpenXmlCompositeElement)obj, resultList, SlideSizes);
+                    else {
+                        //    AddTimings((OpenXmlCompositeElement)obj, animationForThisNode.InnerAnimations, SlideSizes);
+                    }
+
+                }
+            }
+
         }
         }
        
        
         public void AddAnimations(OpenXmlCompositeElement element, List<IAnimation> resultList, SlideSize SlideSizes)
         public void AddAnimations(OpenXmlCompositeElement element, List<IAnimation> resultList, SlideSize SlideSizes)
@@ -284,7 +328,7 @@ namespace HTEXLib.Models
                 result.Type = AnimationTypes.Blinds;
                 result.Type = AnimationTypes.Blinds;
                 //§19.5.18
                 //§19.5.18
                 //Horizontal = 0, horz    Vertical = 1  vert
                 //Horizontal = 0, horz    Vertical = 1  vert
-                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction.Value.ToString() } };
+                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction } };
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.CheckerTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.CheckerTransition) == trans.FirstChild.GetType()) {
 
 
@@ -292,7 +336,7 @@ namespace HTEXLib.Models
                 result.Type = AnimationTypes.Checker;
                 result.Type = AnimationTypes.Checker;
                 //	§19.5.24
                 //	§19.5.24
                 //Horizontal = 0, horz    Vertical = 1  vert
                 //Horizontal = 0, horz    Vertical = 1  vert
-                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction.Value.ToString() } };
+                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction } };
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.CircleTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.CircleTransition) == trans.FirstChild.GetType()) {
                 var child = trans.GetFirstChild<CircleTransition>();
                 var child = trans.GetFirstChild<CircleTransition>();
@@ -311,14 +355,14 @@ namespace HTEXLib.Models
                 result.Type = AnimationTypes.Comb;
                 result.Type = AnimationTypes.Comb;
                 //	§19.5.30
                 //	§19.5.30
                 //Horizontal = 0, horz    Vertical = 1  vert
                 //Horizontal = 0, horz    Vertical = 1  vert
-                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction.Value.ToString() } };
+                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction } };
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.CoverTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.CoverTransition) == trans.FirstChild.GetType()) {
                 var child = trans.GetFirstChild<CoverTransition>();
                 var child = trans.GetFirstChild<CoverTransition>();
                 result.Type = AnimationTypes.Cover;
                 result.Type = AnimationTypes.Cover;
                 //	§19.5.32
                 //	§19.5.32
                 //u up 默认 , d down , l left  ,r right  ,ld left down  ,lu left up, rd right down ,ru right up 
                 //u up 默认 , d down , l left  ,r right  ,ld left down  ,lu left up, rd right down ,ru right up 
-                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction.Value.ToString() } };
+                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction } };
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.CutTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.CutTransition) == trans.FirstChild.GetType()) {
                 var child = trans.GetFirstChild<CutTransition>();
                 var child = trans.GetFirstChild<CutTransition>();
@@ -366,14 +410,14 @@ namespace HTEXLib.Models
                 result.Type = AnimationTypes.Pull;
                 result.Type = AnimationTypes.Pull;
                 //	§19.5.58
                 //	§19.5.58
                 //u up 默认 , d down , l left  ,r right  ,ld left down  ,lu left up, rd right down ,ru right up 
                 //u up 默认 , d down , l left  ,r right  ,ld left down  ,lu left up, rd right down ,ru right up 
-                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction.Value.ToString() } };
+                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction } };
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.PushTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.PushTransition) == trans.FirstChild.GetType()) {
                 var child = trans.GetFirstChild<PushTransition>();
                 var child = trans.GetFirstChild<PushTransition>();
                 result.Type = AnimationTypes.Push;
                 result.Type = AnimationTypes.Push;
                 //	§19.5.59
                 //	§19.5.59
                 //u up 默认  d down  l left  r right
                 //u up 默认  d down  l left  r right
-                result.typeExt =new Dictionary<string, object>() { { result.Type, child.Direction.Value.ToString() } };
+                result.typeExt =new Dictionary<string, object>() { { result.Type, child.Direction } };
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.RandomTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.RandomTransition) == trans.FirstChild.GetType()) {
                 var child = trans.GetFirstChild<RandomTransition>();
                 var child = trans.GetFirstChild<RandomTransition>();
@@ -383,19 +427,19 @@ namespace HTEXLib.Models
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.RandomBarTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.RandomBarTransition) == trans.FirstChild.GetType()) {
                 var child = trans.GetFirstChild<RandomBarTransition>();
                 var child = trans.GetFirstChild<RandomBarTransition>();
-                result.Type = AnimationTypes.RandomBar;
+                result.Type = AnimationTypes.RandomBars;
                 // Horizontal = 0, horz Vertical = 1  vert
                 // Horizontal = 0, horz Vertical = 1  vert
                 //	§19.5.61
                 //	§19.5.61
-                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction.Value.ToString() } };
+                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction } };
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.SplitTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.SplitTransition) == trans.FirstChild.GetType()) {
                 var child = trans.GetFirstChild<SplitTransition>();
                 var child = trans.GetFirstChild<SplitTransition>();
                 result.Type = AnimationTypes.Split;
                 result.Type = AnimationTypes.Split;
                 // Out = 0, out In = 1  in
                 // Out = 0, out In = 1  in
-                var dir = child.Direction.Value.ToString();
+                var dir = child.Direction;
                 // Horizontal = 0, horz Vertical = 1  vert
                 // Horizontal = 0, horz Vertical = 1  vert
                 //	§19.5.71
                 //	§19.5.71
-                var orient = child.Orientation.Value.ToString();
+                var orient = child.Orientation;
                 result.typeExt = new Dictionary<string, object>() { { result.Type,new { dir , orient } } };
                 result.typeExt = new Dictionary<string, object>() { { result.Type,new { dir , orient } } };
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.StripsTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.StripsTransition) == trans.FirstChild.GetType()) {
@@ -403,7 +447,7 @@ namespace HTEXLib.Models
                 result.Type = AnimationTypes.Strips;
                 result.Type = AnimationTypes.Strips;
                 //  Left-Up lu , Right-Up ru ,Left-Downld , Right-Down rd 
                 //  Left-Up lu , Right-Up ru ,Left-Downld , Right-Down rd 
                 //	§19.5.74
                 //	§19.5.74
-                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction.Value.ToString() } };
+                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction } };
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.WedgeTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.WedgeTransition) == trans.FirstChild.GetType()) {
                 var child = trans.GetFirstChild<WedgeTransition>();
                 var child = trans.GetFirstChild<WedgeTransition>();
@@ -416,21 +460,21 @@ namespace HTEXLib.Models
                 result.Type = AnimationTypes.Wheel;
                 result.Type = AnimationTypes.Wheel;
                 //19.5.95
                 //19.5.95
                 // 1,一个扇形中心旋转一圈,右上角开始,  2 两个扇形旋转, 3三个扇形旋转,4 四个扇形旋转, 8 八个扇形旋转
                 // 1,一个扇形中心旋转一圈,右上角开始,  2 两个扇形旋转, 3三个扇形旋转,4 四个扇形旋转, 8 八个扇形旋转
-                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Spokes.Value.ToString() } };
+                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Spokes } };
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.WipeTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.WipeTransition) == trans.FirstChild.GetType()) {
                 var child = trans.GetFirstChild<WipeTransition>();
                 var child = trans.GetFirstChild<WipeTransition>();
                 result.Type = AnimationTypes.Wipe;
                 result.Type = AnimationTypes.Wipe;
                 //u up 默认 , d down , l left  ,r right 
                 //u up 默认 , d down , l left  ,r right 
                 //	§19.5.96
                 //	§19.5.96
-                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction.Value.ToString() } };
+                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction } };
             }
             }
             else if (typeof(DocumentFormat.OpenXml.Presentation.ZoomTransition) == trans.FirstChild.GetType()) {
             else if (typeof(DocumentFormat.OpenXml.Presentation.ZoomTransition) == trans.FirstChild.GetType()) {
                 var child = trans.GetFirstChild<ZoomTransition>();
                 var child = trans.GetFirstChild<ZoomTransition>();
                 result.Type = AnimationTypes.Zoom;
                 result.Type = AnimationTypes.Zoom;
                 // Out = 0, out In = 1  in
                 // Out = 0, out In = 1  in
                 //	§19.5.97
                 //	§19.5.97
-                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction.Value.ToString() } };
+                result.typeExt = new Dictionary<string, object>() { { result.Type, child.Direction } };
             }
             }
             var SoundAction = trans.GetFirstChild<SoundAction>();
             var SoundAction = trans.GetFirstChild<SoundAction>();
             if (SoundAction != null) {
             if (SoundAction != null) {

+ 13 - 0
HTEXLib/Models/PathAnimtime.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using static HTEXLib.Animations.MotionPathAnimation;
+
+namespace HTEXLib.Models
+{
+    public class PathAnimtime: Animtime
+    {
+        public List<PathPart> path { get; set; }
+
+    }
+}

+ 2 - 1
HTEXLib/Models/Slide.cs

@@ -1,4 +1,5 @@
 using HTEXLib.Animations;
 using HTEXLib.Animations;
+using HTEXLib.Models;
 using Newtonsoft.Json.Linq;
 using Newtonsoft.Json.Linq;
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
@@ -9,7 +10,7 @@ namespace HTEXLib
 {
 {
     public class Slide
     public class Slide
     {
     {
-        public List<IAnimation> animations { get; set; }
+        public List<Animtime>  animations { get; set; }
         public List<Item> item { get; set; }
         public List<Item> item { get; set; }
         public Fill fill { get; set; }
         public Fill fill { get; set; }
         public int index { get; set; }
         public int index { get; set; }

+ 1 - 0
HTEXMarkWeb/Controllers/HtexController.cs

@@ -24,6 +24,7 @@ namespace HTEXWeb.Controllers
         }
         }
 
 
         [HttpPost("upload")]
         [HttpPost("upload")]
+        [RequestSizeLimit(102_400_000_00)] //最大10000m左右
         public async Task<IActionResult> Generator([FromForm] IFormFile[] files)
         public async Task<IActionResult> Generator([FromForm] IFormFile[] files)
         {
         {
             string time = string.Format("{0:yyyyMMdd-HHmmss-fff}", DateTimeOffset.Now);
             string time = string.Format("{0:yyyyMMdd-HHmmss-fff}", DateTimeOffset.Now);

+ 5 - 1
HTEXMarkWeb/HTEXMarkWeb.csproj

@@ -62,6 +62,10 @@
       </ResolvedFileToPublish>
       </ResolvedFileToPublish>
     </ItemGroup>
     </ItemGroup>
   </Target>
   </Target>
-
+  <ItemGroup>
+    <Content Update="Publish\web.config">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
   <!--<ProjectExtensions><VisualStudio><UserProperties properties_4launchsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>-->
   <!--<ProjectExtensions><VisualStudio><UserProperties properties_4launchsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>-->
 </Project>
 </Project>

File diff suppressed because it is too large
+ 3871 - 0
HTEXMarkWeb/Views/Tiger建议.md


+ 9 - 0
HTEXTest/HTEXTest.csproj

@@ -5,6 +5,15 @@
     <TargetFramework>netcoreapp3.1</TargetFramework>
     <TargetFramework>netcoreapp3.1</TargetFramework>
   </PropertyGroup>
   </PropertyGroup>
 
 
+  <ItemGroup>
+    <None Remove="charts.xml" />
+    <None Remove="demo.xml" />
+    <None Remove="Tiger建议.md" />
+    <None Remove="对比.xml" />
+  </ItemGroup>
+
+ 
+
   <ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\HTEXLib\HTEXLib.csproj" />
     <ProjectReference Include="..\HTEXLib\HTEXLib.csproj" />
   </ItemGroup>
   </ItemGroup>

File diff suppressed because it is too large
+ 3988 - 996
HTEXTest/demo.xml


+ 0 - 73
HTEXWeb/对比.xml

@@ -1,73 +0,0 @@
-<p:par>
-  <p:cTn id="17" presetID="2" presetClass="entr" presetSubtype="8" fill="hold" grpId="0" nodeType="clickEffect">
-    <p:stCondLst>
-      <p:cond delay="0"/>
-    </p:stCondLst>
-    <p:childTnLst>
-      <p:set>
-        <p:cBhvr>
-          <p:cTn id="18" dur="1" fill="hold">
-            <p:stCondLst>
-              <p:cond delay="0"/>
-            </p:stCondLst>
-          </p:cTn>
-          <p:tgtEl>
-            <p:spTgt spid="2"/>
-          </p:tgtEl>
-          <p:attrNameLst>
-            <p:attrName>style.visibility</p:attrName>
-          </p:attrNameLst>
-        </p:cBhvr>
-        <p:to>
-          <p:strVal val="visible"/>
-        </p:to>
-      </p:set>
-      <p:anim calcmode="lin" valueType="num">
-        <p:cBhvr additive="base">
-          <p:cTn id="19" dur="500" fill="hold"/>
-          <p:tgtEl>
-            <p:spTgt spid="2"/>
-          </p:tgtEl>
-          <p:attrNameLst>
-            <p:attrName>ppt_x</p:attrName>
-          </p:attrNameLst>
-        </p:cBhvr>
-        <p:tavLst>
-          <p:tav tm="0">
-            <p:val>
-              <p:strVal val="0-#ppt_w/2"/>
-            </p:val>
-          </p:tav>
-          <p:tav tm="100000">
-            <p:val>
-              <p:strVal val="#ppt_x"/>
-            </p:val>
-          </p:tav>
-        </p:tavLst>
-      </p:anim>
-      <p:anim calcmode="lin" valueType="num">
-        <p:cBhvr additive="base">
-          <p:cTn id="20" dur="500" fill="hold"/>
-          <p:tgtEl>
-            <p:spTgt spid="2"/>
-          </p:tgtEl>
-          <p:attrNameLst>
-            <p:attrName>ppt_y</p:attrName>
-          </p:attrNameLst>
-        </p:cBhvr>
-        <p:tavLst>
-          <p:tav tm="0">
-            <p:val>
-              <p:strVal val="#ppt_y"/>
-            </p:val>
-          </p:tav>
-          <p:tav tm="100000">
-            <p:val>
-              <p:strVal val="#ppt_y"/>
-            </p:val>
-          </p:tav>
-        </p:tavLst>
-      </p:anim>
-    </p:childTnLst>
-  </p:cTn>
-</p:par>