@@ -31,9 +31,22 @@ public AnimateFacade(string shapeId = "1", int duration = 0, string type = "fade
31
31
}
32
32
public Timing animate ( )
33
33
{
34
- return GenerateTiming ( ShapeId , 1000 , "fade" ) ;
34
+ Timing timing = null ;
35
+ switch ( Type )
36
+ {
37
+ case "Fade" :
38
+ timing = GenerateFadeTiming ( ShapeId , 1000 ) ;
39
+ break ;
40
+ case "FlyIn" :
41
+ timing = GenerateFlyInTiming ( ShapeId , 1000 ) ;
42
+ break ;
43
+ default :
44
+ timing = new Timing ( ) ;
45
+ break ;
46
+ }
47
+ return timing ;
35
48
}
36
- public Timing GenerateTiming ( String shapeId , int duration , String type )
49
+ public Timing GenerateFadeTiming ( String shapeId , int duration )
37
50
{
38
51
Timing timing1 = new Timing ( ) ;
39
52
@@ -120,7 +133,7 @@ public Timing GenerateTiming(String shapeId, int duration, String type)
120
133
setBehavior1 . Append ( commonBehavior1 ) ;
121
134
setBehavior1 . Append ( toVariantValue1 ) ;
122
135
123
- AnimateEffect animateEffect1 = new AnimateEffect ( ) { Transition = AnimateEffectTransitionValues . In , Filter = type } ;
136
+ AnimateEffect animateEffect1 = new AnimateEffect ( ) { Transition = AnimateEffectTransitionValues . In , Filter = "fade" } ;
124
137
125
138
CommonBehavior commonBehavior2 = new CommonBehavior ( ) ;
126
139
CommonTimeNode commonTimeNode7 = new CommonTimeNode ( ) { Id = ( UInt32Value ) 7U , Duration = duration . ToString ( ) } ;
@@ -303,6 +316,260 @@ public Timing GenerateTiming(String shapeId, int duration, String type)
303
316
return timing1 ;
304
317
}
305
318
319
+ public Timing GenerateFlyInTiming ( String shapeId , int duration )
320
+ {
321
+ Timing timing1 = new Timing ( ) ;
322
+
323
+ TimeNodeList timeNodeList1 = new TimeNodeList ( ) ;
324
+
325
+ ParallelTimeNode parallelTimeNode1 = new ParallelTimeNode ( ) ;
326
+
327
+ CommonTimeNode commonTimeNode1 = new CommonTimeNode ( ) { Id = ( UInt32Value ) 1U , Duration = "indefinite" , Restart = TimeNodeRestartValues . Never , NodeType = TimeNodeValues . TmingRoot } ;
328
+
329
+ ChildTimeNodeList childTimeNodeList1 = new ChildTimeNodeList ( ) ;
330
+
331
+ SequenceTimeNode sequenceTimeNode1 = new SequenceTimeNode ( ) { Concurrent = true , NextAction = NextActionValues . Seek } ;
332
+
333
+ CommonTimeNode commonTimeNode2 = new CommonTimeNode ( ) { Id = ( UInt32Value ) 2U , Duration = "indefinite" , NodeType = TimeNodeValues . MainSequence } ;
334
+
335
+ ChildTimeNodeList childTimeNodeList2 = new ChildTimeNodeList ( ) ;
336
+
337
+ ParallelTimeNode parallelTimeNode2 = new ParallelTimeNode ( ) ;
338
+
339
+ CommonTimeNode commonTimeNode3 = new CommonTimeNode ( ) { Id = ( UInt32Value ) 3U , Fill = TimeNodeFillValues . Hold } ;
340
+
341
+ StartConditionList startConditionList1 = new StartConditionList ( ) ;
342
+ Condition condition1 = new Condition ( ) { Delay = "indefinite" } ;
343
+
344
+ startConditionList1 . Append ( condition1 ) ;
345
+
346
+ ChildTimeNodeList childTimeNodeList3 = new ChildTimeNodeList ( ) ;
347
+
348
+ ParallelTimeNode parallelTimeNode3 = new ParallelTimeNode ( ) ;
349
+
350
+ CommonTimeNode commonTimeNode4 = new CommonTimeNode ( ) { Id = ( UInt32Value ) 4U , Fill = TimeNodeFillValues . Hold } ;
351
+
352
+ StartConditionList startConditionList2 = new StartConditionList ( ) ;
353
+ Condition condition2 = new Condition ( ) { Delay = "0" } ;
354
+
355
+ startConditionList2 . Append ( condition2 ) ;
356
+
357
+ ChildTimeNodeList childTimeNodeList4 = new ChildTimeNodeList ( ) ;
358
+
359
+ ParallelTimeNode parallelTimeNode4 = new ParallelTimeNode ( ) ;
360
+
361
+ CommonTimeNode commonTimeNode5 = new CommonTimeNode ( ) { Id = ( UInt32Value ) 5U , PresetId = 2 , PresetClass = TimeNodePresetClassValues . Entrance , PresetSubtype = 4 , Fill = TimeNodeFillValues . Hold , GroupId = ( UInt32Value ) 0U , NodeType = TimeNodeValues . ClickEffect } ;
362
+
363
+ StartConditionList startConditionList3 = new StartConditionList ( ) ;
364
+ Condition condition3 = new Condition ( ) { Delay = "0" } ;
365
+
366
+ startConditionList3 . Append ( condition3 ) ;
367
+
368
+ ChildTimeNodeList childTimeNodeList5 = new ChildTimeNodeList ( ) ;
369
+
370
+ SetBehavior setBehavior1 = new SetBehavior ( ) ;
371
+
372
+ CommonBehavior commonBehavior1 = new CommonBehavior ( ) ;
373
+
374
+ CommonTimeNode commonTimeNode6 = new CommonTimeNode ( ) { Id = ( UInt32Value ) 6U , Duration = "1" , Fill = TimeNodeFillValues . Hold } ;
375
+
376
+ StartConditionList startConditionList4 = new StartConditionList ( ) ;
377
+ Condition condition4 = new Condition ( ) { Delay = "0" } ;
378
+
379
+ startConditionList4 . Append ( condition4 ) ;
380
+
381
+ commonTimeNode6 . Append ( startConditionList4 ) ;
382
+
383
+ TargetElement targetElement1 = new TargetElement ( ) ;
384
+ ShapeTarget shapeTarget1 = new ShapeTarget ( ) { ShapeId = ShapeId } ;
385
+
386
+ targetElement1 . Append ( shapeTarget1 ) ;
387
+
388
+ AttributeNameList attributeNameList1 = new AttributeNameList ( ) ;
389
+ AttributeName attributeName1 = new AttributeName ( ) ;
390
+ attributeName1 . Text = "style.visibility" ;
391
+
392
+ attributeNameList1 . Append ( attributeName1 ) ;
393
+
394
+ commonBehavior1 . Append ( commonTimeNode6 ) ;
395
+ commonBehavior1 . Append ( targetElement1 ) ;
396
+ commonBehavior1 . Append ( attributeNameList1 ) ;
397
+
398
+ ToVariantValue toVariantValue1 = new ToVariantValue ( ) ;
399
+ StringVariantValue stringVariantValue1 = new StringVariantValue ( ) { Val = "visible" } ;
400
+
401
+ toVariantValue1 . Append ( stringVariantValue1 ) ;
402
+
403
+ setBehavior1 . Append ( commonBehavior1 ) ;
404
+ setBehavior1 . Append ( toVariantValue1 ) ;
405
+
406
+ Animate animate1 = new Animate ( ) { CalculationMode = AnimateBehaviorCalculateModeValues . Linear , ValueType = AnimateBehaviorValues . Number } ;
407
+
408
+ CommonBehavior commonBehavior2 = new CommonBehavior ( ) { Additive = BehaviorAdditiveValues . Base } ;
409
+ CommonTimeNode commonTimeNode7 = new CommonTimeNode ( ) { Id = ( UInt32Value ) 7U , Duration = duration . ToString ( ) , Fill = TimeNodeFillValues . Hold } ;
410
+
411
+ TargetElement targetElement2 = new TargetElement ( ) ;
412
+ ShapeTarget shapeTarget2 = new ShapeTarget ( ) { ShapeId = ShapeId } ;
413
+
414
+ targetElement2 . Append ( shapeTarget2 ) ;
415
+
416
+ AttributeNameList attributeNameList2 = new AttributeNameList ( ) ;
417
+ AttributeName attributeName2 = new AttributeName ( ) ;
418
+ attributeName2 . Text = "ppt_x" ;
419
+
420
+ attributeNameList2 . Append ( attributeName2 ) ;
421
+
422
+ commonBehavior2 . Append ( commonTimeNode7 ) ;
423
+ commonBehavior2 . Append ( targetElement2 ) ;
424
+ commonBehavior2 . Append ( attributeNameList2 ) ;
425
+
426
+ TimeAnimateValueList timeAnimateValueList1 = new TimeAnimateValueList ( ) ;
427
+
428
+ TimeAnimateValue timeAnimateValue1 = new TimeAnimateValue ( ) { Time = "0" } ;
429
+
430
+ VariantValue variantValue1 = new VariantValue ( ) ;
431
+ StringVariantValue stringVariantValue2 = new StringVariantValue ( ) { Val = "#ppt_x" } ;
432
+
433
+ variantValue1 . Append ( stringVariantValue2 ) ;
434
+
435
+ timeAnimateValue1 . Append ( variantValue1 ) ;
436
+
437
+ TimeAnimateValue timeAnimateValue2 = new TimeAnimateValue ( ) { Time = "100000" } ;
438
+
439
+ VariantValue variantValue2 = new VariantValue ( ) ;
440
+ StringVariantValue stringVariantValue3 = new StringVariantValue ( ) { Val = "#ppt_x" } ;
441
+
442
+ variantValue2 . Append ( stringVariantValue3 ) ;
443
+
444
+ timeAnimateValue2 . Append ( variantValue2 ) ;
445
+
446
+ timeAnimateValueList1 . Append ( timeAnimateValue1 ) ;
447
+ timeAnimateValueList1 . Append ( timeAnimateValue2 ) ;
448
+
449
+ animate1 . Append ( commonBehavior2 ) ;
450
+ animate1 . Append ( timeAnimateValueList1 ) ;
451
+
452
+ Animate animate2 = new Animate ( ) { CalculationMode = AnimateBehaviorCalculateModeValues . Linear , ValueType = AnimateBehaviorValues . Number } ;
453
+
454
+ CommonBehavior commonBehavior3 = new CommonBehavior ( ) { Additive = BehaviorAdditiveValues . Base } ;
455
+ CommonTimeNode commonTimeNode8 = new CommonTimeNode ( ) { Id = ( UInt32Value ) 8U , Duration = Duration . ToString ( ) , Fill = TimeNodeFillValues . Hold } ;
456
+
457
+ TargetElement targetElement3 = new TargetElement ( ) ;
458
+ ShapeTarget shapeTarget3 = new ShapeTarget ( ) { ShapeId = ShapeId } ;
459
+
460
+ targetElement3 . Append ( shapeTarget3 ) ;
461
+
462
+ AttributeNameList attributeNameList3 = new AttributeNameList ( ) ;
463
+ AttributeName attributeName3 = new AttributeName ( ) ;
464
+ attributeName3 . Text = "ppt_y" ;
465
+
466
+ attributeNameList3 . Append ( attributeName3 ) ;
467
+
468
+ commonBehavior3 . Append ( commonTimeNode8 ) ;
469
+ commonBehavior3 . Append ( targetElement3 ) ;
470
+ commonBehavior3 . Append ( attributeNameList3 ) ;
471
+
472
+ TimeAnimateValueList timeAnimateValueList2 = new TimeAnimateValueList ( ) ;
473
+
474
+ TimeAnimateValue timeAnimateValue3 = new TimeAnimateValue ( ) { Time = "0" } ;
475
+
476
+ VariantValue variantValue3 = new VariantValue ( ) ;
477
+ StringVariantValue stringVariantValue4 = new StringVariantValue ( ) { Val = "1+#ppt_h/2" } ;
478
+
479
+ variantValue3 . Append ( stringVariantValue4 ) ;
480
+
481
+ timeAnimateValue3 . Append ( variantValue3 ) ;
482
+
483
+ TimeAnimateValue timeAnimateValue4 = new TimeAnimateValue ( ) { Time = "100000" } ;
484
+
485
+ VariantValue variantValue4 = new VariantValue ( ) ;
486
+ StringVariantValue stringVariantValue5 = new StringVariantValue ( ) { Val = "#ppt_y" } ;
487
+
488
+ variantValue4 . Append ( stringVariantValue5 ) ;
489
+
490
+ timeAnimateValue4 . Append ( variantValue4 ) ;
491
+
492
+ timeAnimateValueList2 . Append ( timeAnimateValue3 ) ;
493
+ timeAnimateValueList2 . Append ( timeAnimateValue4 ) ;
494
+
495
+ animate2 . Append ( commonBehavior3 ) ;
496
+ animate2 . Append ( timeAnimateValueList2 ) ;
497
+
498
+ childTimeNodeList5 . Append ( setBehavior1 ) ;
499
+ childTimeNodeList5 . Append ( animate1 ) ;
500
+ childTimeNodeList5 . Append ( animate2 ) ;
501
+
502
+ commonTimeNode5 . Append ( startConditionList3 ) ;
503
+ commonTimeNode5 . Append ( childTimeNodeList5 ) ;
504
+
505
+ parallelTimeNode4 . Append ( commonTimeNode5 ) ;
506
+
507
+ childTimeNodeList4 . Append ( parallelTimeNode4 ) ;
508
+
509
+ commonTimeNode4 . Append ( startConditionList2 ) ;
510
+ commonTimeNode4 . Append ( childTimeNodeList4 ) ;
511
+
512
+ parallelTimeNode3 . Append ( commonTimeNode4 ) ;
513
+
514
+ childTimeNodeList3 . Append ( parallelTimeNode3 ) ;
515
+
516
+ commonTimeNode3 . Append ( startConditionList1 ) ;
517
+ commonTimeNode3 . Append ( childTimeNodeList3 ) ;
518
+
519
+ parallelTimeNode2 . Append ( commonTimeNode3 ) ;
520
+
521
+ childTimeNodeList2 . Append ( parallelTimeNode2 ) ;
522
+
523
+ commonTimeNode2 . Append ( childTimeNodeList2 ) ;
524
+
525
+ PreviousConditionList previousConditionList1 = new PreviousConditionList ( ) ;
526
+
527
+ Condition condition5 = new Condition ( ) { Event = TriggerEventValues . OnPrevious , Delay = "0" } ;
528
+
529
+ TargetElement targetElement4 = new TargetElement ( ) ;
530
+ SlideTarget slideTarget1 = new SlideTarget ( ) ;
531
+
532
+ targetElement4 . Append ( slideTarget1 ) ;
533
+
534
+ condition5 . Append ( targetElement4 ) ;
535
+
536
+ previousConditionList1 . Append ( condition5 ) ;
537
+
538
+ NextConditionList nextConditionList1 = new NextConditionList ( ) ;
539
+
540
+ Condition condition6 = new Condition ( ) { Event = TriggerEventValues . OnNext , Delay = "0" } ;
541
+
542
+ TargetElement targetElement5 = new TargetElement ( ) ;
543
+ SlideTarget slideTarget2 = new SlideTarget ( ) ;
544
+
545
+ targetElement5 . Append ( slideTarget2 ) ;
546
+
547
+ condition6 . Append ( targetElement5 ) ;
548
+
549
+ nextConditionList1 . Append ( condition6 ) ;
550
+
551
+ sequenceTimeNode1 . Append ( commonTimeNode2 ) ;
552
+ sequenceTimeNode1 . Append ( previousConditionList1 ) ;
553
+ sequenceTimeNode1 . Append ( nextConditionList1 ) ;
554
+
555
+ childTimeNodeList1 . Append ( sequenceTimeNode1 ) ;
556
+
557
+ commonTimeNode1 . Append ( childTimeNodeList1 ) ;
558
+
559
+ parallelTimeNode1 . Append ( commonTimeNode1 ) ;
560
+
561
+ timeNodeList1 . Append ( parallelTimeNode1 ) ;
562
+
563
+ BuildList buildList1 = new BuildList ( ) ;
564
+ BuildParagraph buildParagraph1 = new BuildParagraph ( ) { ShapeId = ShapeId , GroupId = ( UInt32Value ) 0U , AnimateBackground = true } ;
565
+
566
+ buildList1 . Append ( buildParagraph1 ) ;
567
+
568
+ timing1 . Append ( timeNodeList1 ) ;
569
+ timing1 . Append ( buildList1 ) ;
570
+ return timing1 ;
571
+ }
572
+
306
573
}
307
574
308
575
0 commit comments