
A katalogizálás nagyszerű módja a kapcsolódó elemek logikai csoportosításának, és mivel ismerjük a mappák használatát a kapcsolódó fájlok szervezésére, ezért hasonló megközelítést alkalmazhatunk, hogy szekciókat használjunk a diák értelmes csoportokba való rendezésére. Ez azt is lehetővé teszi, hogy minden kollégának egy szekciót rendeljünk, hogy a diák tulajdonjoga egyértelmű legyen az együttműködés során. Ha pedig egy üres lappal kezded, a szekciókat arra is használhatod, hogy vázold a bemutatódat. Általában a szekciókat nagy bemutatókhoz tervezték, amelyek nagy számú diát tartalmaznak, amelyek könnyen logikai csoportos
Mielőtt tovább lépnénk, telepítenünk kell az Aspose.Slides Cloud SDK-t .NET-hez, és a legegyszerűbb módja a NuGet csomag telepítése a következő parancs használatával a csomagkezelő konzolon:
Install-Package Aspose.Slides-Cloud -Version 21.2.0
Miután a telepítés befejeződött, a következő lépés az, hogy beszerezzük az autentikációs hitelesítő adatokat, hogy könnyedén és biztonságosan használhassuk az API-jainkat. További részletekért kérjük, látogasson el a
- Hogyan lehet telepíteni az Aspose.Cloud SDK-kat
- Hogyan szerezzünk JWT tokent egy Kliensazonosító és Kliens titkos kulcs segítségével
Szakaszok kezelése
Aspose.Slides Cloud biztosítja a lehetőségeket, hogy
- Kapja meg a meglévő bemutató szakaszokat
- Állítsd be a PowerPoint szekciókat
- Hozzon létre egy új szakaszt
- Change section name
- Mozgassa a szekciót és a diákat más pozícióba
- Törölj egy szakaszt
Get Existing Presentation Sections
Kérés URL
GET https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections?folder=myFolder
C#.NET
string MyAppKey = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
GetSectionsRequest request = new GetSectionsRequest
{
Name = "myPresentaion.pptx",
Folder = "myFolder"
};
Sections sections = api.GetSections(tequest);
Console.WriteLine(sections.SectionList.Count);
Állítsd be a PowerPoint szakaszokat
Kérés URL
PUT https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections?folder=myFolder
Kérelem törzse
{ "sectionList": [{ "name": "Section1", "firstSlideIndex": 1 }, { "name": "Section2", "firstSlideIndex": 4 }]}
C#.NET
string MyAppKey = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
Sections dto = new Sections
{
SectionList = new List<Section>
{
new Section { Name = "Section1", FirstSlideIndex = 1 },
new Section { Name = "Section2", FirstSlideIndex = 4 }
}
};
PutSectionsRequest request = new PutSectionsRequest
{
Name = "myPresentaion.pptx",
Folder = "myFolder",
Sections = dto
};
Sections sections = api.PutSections(request);
Console.WriteLine(sections.SectionList.Count); //2
Console.WriteLine(sections.SectionList[0].SlideList.Count); //3
Hozzon létre egy új szakaszt
Kérés URL
POST https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections?folder=myFolder§ionName=NewSection&slideIndex=4
C#.NET
string MyAppKey = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
PostSectionRequest request = new PostSectionRequest
{
Name = "myPresentaion.pptx",
Folder = "myFolder",
SectionName = "NewSection",
SlideIndex = 4
};
Sections sections = api.PostSection(request);
Console.WriteLine(sections.SectionList.Count);
Változtassa meg a szakasz nevét
Kérés URL
PUT https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections/2?folder=myFolder§ionName=UpdatedSection
C#.NET
string MyAppKey = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
PutSectionRequest request = new PutSectionRequest
{
Name = "myPresentaion.pptx",
Folder = "myFolder",
SectionName = "UpdatedSection",
SectionIndex = 2
};
Sections sections = api.PutSection(request);
Console.WriteLine(sections.SectionList[1].Name); //UpdatedSection
Helyezze át a szakaszt és a diát más pozícióba
Kérés URL
POST https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections/1/move?folder=myFolder&newPosition=2
C#.NET
string MyAppKey = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
PostSectionMoveRequest request = new PostSectionMoveRequest
{
Name = "myPresentaion.pptx",
Folder = "myFolder",
SectionIndex = 1,
NewPosition = 2
};
Sections sections = api.PostSectionMove(request);
Console.WriteLine(sections.SectionList.Count);
Töröljön egy szakaszt
Kérés URL
DELETE https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/sections/2?folder=myFolder
C#.NET
string MyAppKey = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
DeleteSectionRequest request = new DeleteSectionRequest
{
Name = "myPresentaion.pptx",
Folder = "myFolder",
SectionIndex = 2
};
Sections sections = api.DeleteSection(request);
Console.WriteLine(sections.SectionList.Count);