Skip to content

Commit 00bf682

Browse files
Uploaded for v24.12.0
1 parent 3182fff commit 00bf682

18 files changed

+478
-15
lines changed

FileFormat.Slides.Examples.Usage/FileFormat.Slides.Examples.Usage.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="FileFormat.Slides" Version="24.11.0" />
16+
<PackageReference Include="FileFormat.Slides" Version="24.12.1" />
1717
</ItemGroup>
1818

1919

FileFormat.Slides.Examples.Usage/Program.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,61 +65,76 @@ static void Main (string[ ] args)
6565
//rectangleExamples.DrawNewRectangleShapeInNewSlide(filename: "sample.pptx");
6666
//rectangleExamples.RemoveRectangleShapeExistingSlide(filename: "sample.pptx");
6767
//rectangleExamples.SetBackgroundColorOfRectangle(filename: "sample.pptx");
68+
//rectangleExamples.DrawNewRectangleShapeWithAnimation(filename: "sample.pptx");
6869

6970
//CircleExamples circleExamples = new CircleExamples();
7071
//circleExamples.DrawCircleShapeInNewSlide(filename: "sample.pptx");
7172
//circleExamples.SetBackgroundColorOfCircle(filename: "sample.pptx");
7273
//circleExamples.RemoveCircleShapeExistingSlide(filename: "sample.pptx");
74+
//circleExamples.DrawCircleShapeWithAnimation(filename: "sample.pptx");
7375

7476
//TriangleExamples triangleExamples = new TriangleExamples();
7577
//triangleExamples.DrawNewTriangleShapeInNewSlide(filename: "sample.pptx");
7678
//triangleExamples.RemoveTriangleShapeExistingSlide(filename: "sample.pptx");
7779
//triangleExamples.SetBackgroundColorOfTriangle(filename: "sample.pptx");
80+
//triangleExamples.DrawNewTriangleShapeWithAnimation(filename: "sample.pptx");
7881

7982
//DiamondExamples diamondExamples = new DiamondExamples();
8083
//diamondExamples.DrawNewDiamondShapeInNewSlide(filename: "sample.pptx");
8184
//diamondExamples.RemoveDiamondShapeExistingSlide(filename: "sample.pptx");
8285
//diamondExamples.SetBackgroundColorOfDiamond(filename: "sample.pptx");
86+
//diamondExamples.DrawNewDiamondShapeWithAnimation(filename: "sample.pptx");
8387

8488
//LineExamples lineExamples = new LineExamples();
8589
//lineExamples.DrawNewLineShapeInNewSlide(filename: "sample.pptx");
8690
//lineExamples.RemoveLineShapeExistingSlide(filename: "sample.pptx");
91+
//lineExamples.DrawNewLineShapeWithAnimation(filename: "sample.pptx");
8792

8893
//CurvedLineExamples curvedlineExamples = new CurvedLineExamples();
8994
//curvedlineExamples.DrawNewCurvedLineShapeInNewSlide(filename: "sample.pptx");
9095
//curvedlineExamples.RemoveCurvedLineShapeExistingSlide(filename: "sample.pptx");
96+
//curvedlineExamples.DrawNewCurvedLineShapeWithAnimation(filename: "sample.pptx");
9197

92-
//ArrowExamples curvedlineExamples = new ArrowExamples();
98+
//ArrowExamples arrowExamples = new ArrowExamples();
9399
//arrowExamples.DrawNewArrowShapeInNewSlide(filename: "sample.pptx");
94100
//arrowExamples.RemoveArrowShapeExistingSlide(filename: "sample.pptx");
101+
//arrowExamples.DrawNewArrowShapeWithAnimation(filename: "sample.pptx");
95102

96103
//DoubleArrowExamples doubleArrowExamples = new DoubleArrowExamples();
97104
//doubleArrowExamples.DrawNewDoubleArrowShapeInNewSlide(filename: "sample.pptx");
98105
//doubleArrowExamples.RemoveDoubleArrowShapeExistingSlide(filename: "sample.pptx");
106+
//doubleArrowExamples.DrawNewDoubleArrowShapeWithAnimation(filename: "sample.pptx");
99107

100108
//DoubleBracketExamples doubleBracketExamples = new DoubleBracketExamples();
101109
//doubleBracketExamples.DrawNewDoubleBracketShapeInNewSlide(filename: "sample.pptx");
102-
//doubleBracketExamples.RemoveDoubleBracketExistingSlide(filename: "sample.pptx");
110+
//doubleBracketExamples.RemoveDoubleBracketShapeExistingSlide(filename: "sample.pptx");
111+
//doubleBracketExamples.DrawNewDoubleBracketShapeWithAnimation(filename: "sample.pptx");
103112

104113
//DoubleBraceExamples doubleBraceExamples = new DoubleBraceExamples();
105114
//doubleBraceExamples.DrawNewDoubleBraceShapeInNewSlide(filename: "sample.pptx");
106-
//doubleBraceExamples.RemoveDoubleBraceExistingSlide(filename: "sample.pptx");
115+
//doubleBraceExamples.RemoveDoubleBraceShapeExistingSlide(filename: "sample.pptx");
116+
//doubleBraceExamples.DrawNewDoubleBraceShapeWithAnimation(filename: "sample.pptx");
107117

108118
//PentagonExamples pentagonExamples = new PentagonExamples();
109119
//pentagonExamples.DrawNewPentagonShapeInNewSlide(filename: "sample.pptx");
110120
//pentagonExamples.RemovePentagonShapeExistingSlide(filename: "sample.pptx");
121+
//pentagonExamples.DrawNewPentagonShapeWithAnimation(filename: "sample.pptx");
111122

112123
//HexagonExamples hexagonExamples = new HexagonExamples();
113124
//hexagonExamples.DrawNewHexagonShapeInNewSlide(filename: "sample.pptx");
114125
//hexagonExamples.RemoveHexagonShapeExistingSlide(filename: "sample.pptx");
126+
//hexagonExamples.DrawNewHexagonShapeWithAnimation(filename: "sample.pptx");
115127

116128
//TrapezoidExamples trapezoidExamples = new TrapezoidExamples();
117129
//trapezoidExamples.DrawNewTrapezoidShapeInNewSlide(filename: "sample.pptx");
118130
//trapezoidExamples.RemoveTrapezoidShapeExistingSlide(filename: "sample.pptx");
131+
//trapezoidExamples.DrawNewTrapezoidShapeWithAnimation(filename: "sample.pptx");
119132

120133
//PieExamples pieExamples = new PieExamples();
121134
//pieExamples.DrawNewPieShapeInNewSlide(filename: "sample.pptx");
122135
//pieExamples.RemovePieShapeExistingSlide(filename: "sample.pptx");
136+
//pieExamples.DrawNewPieShapeWithAnimation(filename: "sample.pptx");
137+
123138
}
124139
}
125140
}

FileFormat.Slides.Examples.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VisualStudioVersion = 16.0.33130.400
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FileFormat.Slides.Examples", "FileFormat.Slides.Examples\FileFormat.Slides.Examples.csproj", "{0CEE4A6B-EDE1-4FB0-8088-95F780B9416D}"
77
EndProject
8-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FileFormat.Slides.Examples.Usage", "FileFormat.Slides.Examples.Usage\FileFormat.Slides.Examples.Usage.csproj", "{7CC0AB7F-BC66-4586-9AE0-37D55036B244}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FileFormat.Slides.Examples.Usage", "FileFormat.Slides.Examples.Usage\FileFormat.Slides.Examples.Usage.csproj", "{7F8EC59D-715A-40E3-9846-6664D0D34222}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -17,10 +17,10 @@ Global
1717
{0CEE4A6B-EDE1-4FB0-8088-95F780B9416D}.Debug|Any CPU.Build.0 = Debug|Any CPU
1818
{0CEE4A6B-EDE1-4FB0-8088-95F780B9416D}.Release|Any CPU.ActiveCfg = Release|Any CPU
1919
{0CEE4A6B-EDE1-4FB0-8088-95F780B9416D}.Release|Any CPU.Build.0 = Release|Any CPU
20-
{7CC0AB7F-BC66-4586-9AE0-37D55036B244}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21-
{7CC0AB7F-BC66-4586-9AE0-37D55036B244}.Debug|Any CPU.Build.0 = Debug|Any CPU
22-
{7CC0AB7F-BC66-4586-9AE0-37D55036B244}.Release|Any CPU.ActiveCfg = Release|Any CPU
23-
{7CC0AB7F-BC66-4586-9AE0-37D55036B244}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{7F8EC59D-715A-40E3-9846-6664D0D34222}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{7F8EC59D-715A-40E3-9846-6664D0D34222}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{7F8EC59D-715A-40E3-9846-6664D0D34222}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{7F8EC59D-715A-40E3-9846-6664D0D34222}.Release|Any CPU.Build.0 = Release|Any CPU
2424
EndGlobalSection
2525
GlobalSection(SolutionProperties) = preSolution
2626
HideSolutionNode = FALSE

FileFormat.Slides.Examples/ArrowExamples.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,38 @@ public void DrawNewArrowShapeInNewSlide(string documentDirectory = newDocsDirect
7676
}
7777
}
7878
/// <summary>
79+
/// This method adds Arrow segment or shape in the silde of a new PowerPoint presentation.
80+
/// </summary>
81+
/// <param name="documentDirectory">Path of the presentation folder</param>
82+
/// <param name="filename">Presentation name</param>
83+
public void DrawNewArrowShapeWithAnimation(string documentDirectory = newDocsDirectory, string filename = "test.pptx")
84+
{
85+
try
86+
{
87+
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}");
88+
// Create an instance of Arrow
89+
90+
Arrow Arrow = new Arrow();
91+
// Set height and width
92+
Arrow.Width = 400.0;
93+
Arrow.Height = 400.0;
94+
// Set Y position
95+
Arrow.Y = 100.0;
96+
Arrow.Animation = Common.Enumerations.AnimationType.FlyIn;
97+
// First slide
98+
Slide slide = presentation.GetSlides()[1];
99+
// Add Arrow shapes.
100+
slide.DrawArrow(Arrow);
101+
// Save the PPT or PPTX
102+
presentation.Save();
103+
104+
}
105+
catch (System.Exception ex)
106+
{
107+
throw new FileFormat.Slides.Common.FileFormatException("An error occurred.", ex);
108+
}
109+
}
110+
/// <summary>
79111
/// This method Sets the background color of a Arrow shape
80112
/// </summary>
81113
/// <param name="documentDirectory">Path of the presentation folder</param>

FileFormat.Slides.Examples/CircleExamples.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,38 @@ public void DrawCircleShapeInNewSlide(string documentDirectory = newDocsDirector
7373
}
7474
}
7575
/// <summary>
76+
/// This method adds Circle segment or shape in the silde of a new PowerPoint presentation with animation.
77+
/// </summary>
78+
/// <param name="documentDirectory">Path of the presentation folder</param>
79+
/// <param name="filename">Presentation name</param>
80+
public void DrawCircleShapeWithAnimation(string documentDirectory = newDocsDirectory, string filename = "test.pptx")
81+
{
82+
try
83+
{
84+
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}");
85+
// Create an instance of Circle
86+
Circle Circle = new Circle();
87+
// Set height and width
88+
Circle.Width = 400.0;
89+
Circle.Height = 400.0;
90+
// Set Y position
91+
Circle.Y = 100.0;
92+
// Set animation
93+
Circle.Animation = Common.Enumerations.AnimationType.FlyIn;
94+
// First slide
95+
Slide slide = presentation.GetSlides()[1];
96+
// Add Circle shapes.
97+
slide.DrawCircle(Circle);
98+
// Save the PPT or PPTX
99+
presentation.Save();
100+
101+
}
102+
catch (System.Exception ex)
103+
{
104+
throw new FileFormat.Slides.Common.FileFormatException("An error occurred.", ex);
105+
}
106+
}
107+
/// <summary>
76108
/// This method Sets the background color of a Circle shape
77109
/// </summary>
78110
/// <param name="documentDirectory">Path of the presentation folder</param>

FileFormat.Slides.Examples/CurvedLineExamples.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,38 @@ public void DrawNewCurvedLineShapeInNewSlide(string documentDirectory = newDocsD
7575
}
7676
}
7777
/// <summary>
78+
/// This method adds CurvedLine segment or shape in the silde of a new PowerPoint presentation with animation.
79+
/// </summary>
80+
/// <param name="documentDirectory">Path of the presentation folder</param>
81+
/// <param name="filename">Presentation name</param>
82+
public void DrawNewCurvedLineShapeWithAnimation(string documentDirectory = newDocsDirectory, string filename = "test.pptx")
83+
{
84+
try
85+
{
86+
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}");
87+
// Create an instance of CurvedLine
88+
CurvedLine CurvedLine = new CurvedLine();
89+
// Set height and width
90+
CurvedLine.Width = 400.0;
91+
CurvedLine.Height = 400.0;
92+
// Set Y position
93+
CurvedLine.Y = 100.0;
94+
//Set animation
95+
CurvedLine.Animation = Common.Enumerations.AnimationType.FlyIn;
96+
// First slide
97+
Slide slide = presentation.GetSlides()[1];
98+
// Add CurvedLine shapes.
99+
slide.DrawCurvedLine(CurvedLine);
100+
// Save the PPT or PPTX
101+
presentation.Save();
102+
103+
}
104+
catch (System.Exception ex)
105+
{
106+
throw new FileFormat.Slides.Common.FileFormatException("An error occurred.", ex);
107+
}
108+
}
109+
/// <summary>
78110
/// This method Sets the background color of a CurvedLine shape
79111
/// </summary>
80112
/// <param name="documentDirectory">Path of the presentation folder</param>

FileFormat.Slides.Examples/DiamondExamples.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,37 @@ public void DrawNewDiamondShapeInNewSlide(string documentDirectory = newDocsDire
7575
}
7676
}
7777
/// <summary>
78+
/// This method adds Diamond segment or shape in the silde of a new PowerPoint presentation with animation.
79+
/// </summary>
80+
/// <param name="documentDirectory">Path of the presentation folder</param>
81+
/// <param name="filename">Presentation name</param>
82+
public void DrawNewDiamondShapeWithAnimation(string documentDirectory = newDocsDirectory, string filename = "test.pptx")
83+
{
84+
try
85+
{
86+
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}");
87+
// Create an instance of Diamond
88+
Diamond Diamond = new Diamond();
89+
// Set height and width
90+
Diamond.Width = 400.0;
91+
Diamond.Height = 400.0;
92+
// Set Y position
93+
Diamond.Y = 100.0;
94+
// First slide
95+
Diamond.Animation = Common.Enumerations.AnimationType.FlyIn;
96+
Slide slide = presentation.GetSlides()[1];
97+
// Add Diamond shapes.
98+
slide.DrawDiamond(Diamond);
99+
// Save the PPT or PPTX
100+
presentation.Save();
101+
102+
}
103+
catch (System.Exception ex)
104+
{
105+
throw new FileFormat.Slides.Common.FileFormatException("An error occurred.", ex);
106+
}
107+
}
108+
/// <summary>
78109
/// This method Sets the background color of a Diamond shape
79110
/// </summary>
80111
/// <param name="documentDirectory">Path of the presentation folder</param>

FileFormat.Slides.Examples/DoubleArrowExamples.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,38 @@ public void DrawNewDoubleArrowShapeInNewSlide(string documentDirectory = newDocs
7676
}
7777
}
7878
/// <summary>
79+
/// This method adds DoubleArrow segment or shape in the silde of a new PowerPoint presentation with animation.
80+
/// </summary>
81+
/// <param name="documentDirectory">Path of the presentation folder</param>
82+
/// <param name="filename">Presentation name</param>
83+
public void DrawNewDoubleArrowShapeWithAnimation(string documentDirectory = newDocsDirectory, string filename = "test.pptx")
84+
{
85+
try
86+
{
87+
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}");
88+
// Create an instance of DoubleArrow
89+
90+
DoubleArrow DoubleArrow = new DoubleArrow();
91+
// Set height and width
92+
DoubleArrow.Width = 400.0;
93+
DoubleArrow.Height = 400.0;
94+
// Set Y position
95+
DoubleArrow.Y = 100.0;
96+
// First slide
97+
DoubleArrow.Animation = Common.Enumerations.AnimationType.FlyIn;
98+
Slide slide = presentation.GetSlides()[1];
99+
// Add DoubleArrow shapes.
100+
slide.DrawDoubleArrow(DoubleArrow);
101+
// Save the PPT or PPTX
102+
presentation.Save();
103+
104+
}
105+
catch (System.Exception ex)
106+
{
107+
throw new FileFormat.Slides.Common.FileFormatException("An error occurred.", ex);
108+
}
109+
}
110+
/// <summary>
79111
/// This method Sets the background color of a DoubleArrow shape
80112
/// </summary>
81113
/// <param name="documentDirectory">Path of the presentation folder</param>

FileFormat.Slides.Examples/DoubleBraceExamples.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,38 @@ public void DrawNewDoubleBraceShapeInNewSlide(string documentDirectory = newDocs
7676
}
7777
}
7878
/// <summary>
79+
/// This method adds DoubleBrace segment or shape in the silde of a new PowerPoint presentation with animation.
80+
/// </summary>
81+
/// <param name="documentDirectory">Path of the presentation folder</param>
82+
/// <param name="filename">Presentation name</param>
83+
public void DrawNewDoubleBraceShapeWithAnimation(string documentDirectory = newDocsDirectory, string filename = "test.pptx")
84+
{
85+
try
86+
{
87+
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}");
88+
// Create an instance of DoubleBrace
89+
90+
DoubleBrace DoubleBrace = new DoubleBrace();
91+
// Set height and width
92+
DoubleBrace.Width = 400.0;
93+
DoubleBrace.Height = 400.0;
94+
// Set Y position
95+
DoubleBrace.Y = 100.0;
96+
DoubleBrace.Animation = Common.Enumerations.AnimationType.FlyIn;
97+
// First slide
98+
Slide slide = presentation.GetSlides()[1];
99+
// Add DoubleBrace shapes.
100+
slide.DrawDoubleBrace(DoubleBrace);
101+
// Save the PPT or PPTX
102+
presentation.Save();
103+
104+
}
105+
catch (System.Exception ex)
106+
{
107+
throw new FileFormat.Slides.Common.FileFormatException("An error occurred.", ex);
108+
}
109+
}
110+
/// <summary>
79111
/// This method Sets the background color of a DoubleBrace shape
80112
/// </summary>
81113
/// <param name="documentDirectory">Path of the presentation folder</param>

FileFormat.Slides.Examples/DoubleBracketExamples.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,39 @@ public void DrawNewDoubleBracketShapeInNewSlide(string documentDirectory = newDo
7676
}
7777
}
7878
/// <summary>
79+
/// This method adds DoubleBracket segment or shape in the silde of a new PowerPoint presentation with animation.
80+
/// </summary>
81+
/// <param name="documentDirectory">Path of the presentation folder</param>
82+
/// <param name="filename">Presentation name</param>
83+
public void DrawNewDoubleBracketShapeWithAnimation(string documentDirectory = newDocsDirectory, string filename = "test.pptx")
84+
{
85+
try
86+
{
87+
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}");
88+
// Create an instance of DoubleBracket
89+
90+
DoubleBracket DoubleBracket = new DoubleBracket();
91+
// Set height and width
92+
DoubleBracket.Width = 400.0;
93+
DoubleBracket.Height = 400.0;
94+
// Set Y position
95+
DoubleBracket.Y = 100.0;
96+
// Set animation
97+
DoubleBracket.Animation = Common.Enumerations.AnimationType.FlyIn;
98+
// First slide
99+
Slide slide = presentation.GetSlides()[1];
100+
// Add DoubleBracket shapes.
101+
slide.DrawDoubleBracket(DoubleBracket);
102+
// Save the PPT or PPTX
103+
presentation.Save();
104+
105+
}
106+
catch (System.Exception ex)
107+
{
108+
throw new FileFormat.Slides.Common.FileFormatException("An error occurred.", ex);
109+
}
110+
}
111+
/// <summary>
79112
/// This method Sets the background color of a DoubleBracket shape
80113
/// </summary>
81114
/// <param name="documentDirectory">Path of the presentation folder</param>

0 commit comments

Comments
 (0)