ISkins Interface
The ISkins Interface is a collection of available player skins. It provides information about skins and allows the addition of customized skins. This interface can be obtained using the IPresentationConverter.Skins property.
Skins installed with iSpring SDK are located at the following path: C:\Program Files\iSpring\SDK 9\PPT Conversion SDK\players. Also, you can download additional skins using the Load() method.
Table 1. Properties
Property | Value Type | Access | Property description |
---|---|---|---|
Item[] or [] | ISkin | Read only | Gets a skin from the collection. Use Item[] in C++ |
Count | int | Read only | Returns number of skins in the collection. |
Table 2. Methods
Method | Method description |
---|---|
Load(string path) | Loads additional player skin or skins from the specified path. Note: if the path parameter is a folder name, it will search for player.xml files in subfolders. If the path parameter is a file name, the specified skin file name will be loaded. |
Samples
The following samples illustrate typical tasks which can be performed using the ISkins interface.
C# - enumerate skins
using System;
using iSpring;
namespace SkinsSample
{
class Program
{
static void Main(string[] args)
{
IPresentationConverter converter = new PresentationConverter();
string skinsPath = "C:\\Program Files\\iSpring\\SDK 9\\Player SDK\\samples\\presentation-player\\";
converter.Skins.Load(skinsPath + "player-sample-1\\player.xml");
// Load all skins from the directory
// converter.Skins.Load(skinsPath);
// Enumerate available skins
foreach (ISkin skin in converter.Skins)
{
Console.WriteLine($"Skin\tname: \"{skin.Name}\", id: \"{skin.Id}\"");
Console.WriteLine($"\tpriority: {skin.Priority}");
Console.WriteLine();
}
// Get skin by index
Console.WriteLine("The first skin is " + converter.Skins[0].Name);
}
}
}
C#
C++ - get skins by index
_com_ptr_t<iSpring::IPresentationConverter> pPresentationConverter;
pConverter.CreateInstance(__uuidof(iSpring::PresentationConverter));
_com_ptr_t<iSpring::ISkins> pSkins = pPresentationConverter->Skins;
const long skinsCount = pSkins->Count;
_com_ptr_t<iSpring::ISkins> firstSkin = pSkins->Item[0];
CPP