iSpring.Skins Interface
The Skins Interface represents a collection of available player skins. It provides the information about skins and allows adding customized skins. The Skins Interface exposes the following properties and methods.
| Properties |
|
Property |
Value Type |
Access |
Default value |
Property description |
|
Count |
int |
Read only |
|
Returns number of skins in the collection |
| Methods |
|
Method |
Method description |
|
Skin Item(object skinIndex) |
Returns the Skin interface representing a skin with a given skin index. The skinIndex parameter can be one of the following types:
Note: This is a default method of the Skins interface so it can be omitted in some programming languages such as Visual Basic or C#. See the Samples section for more details. |
|
void Load(string path) |
Loads additional player skin or skins from the specified path. |
Samples
The following samples illustrate typical tasks which can be performed using the Skins interface.
C# sample
PresentationConverter pc = new PresentationConverter();
Skins skins = pc.Skins;
// the following ways can be used to access individual skins of the collection
Skin skin1 = skins[1];
Skin skin2 = skins.Item(2);
Skin nullSkin = skins["NullSkin"];
Skin crystalSkin = skins["Crystal"];
// load one skin file
skins.Load("c:\\my skins\\skin1.skin");
// load skin files using wildcard
skins.Load("c:\\all skins\\skin*.skin");
// load all .skin files in c:\myskins folder
skins.Load("c:\\myskins")
// Enumerate the installed skins
foreach (Skin skin in skin)
{
Console.WriteLine(
"Skin \t" + "name: \"" + skin.Name + "\", id: \"" + skin.Id + "\"\n" +
"\t" + "alias: \"" + skin.Alias + "\", Flash Player Version: " + skin.SwfVersion
);
}
VB.NET sample:
Dim pc as new PresentationConverter()
' the following ways can be used to access individual skins of the Skins collection
Dim skins as Skins = pc.Skins
Dim skin1 as Skin = skins(1)
Dim skin2 as Skin = skins(2)
Dim nullSkin as Skin = skins("NullSkin")
Dim advancedSkin as Skin = skins.Item("Advanced")
// load one skin file
skins.Load("c:\my skins\skin1.skin")
// load skin files using wildcard
skins.Load("c:\all skins\skin*.skin")
// load all .skin files in c:\myskins folder
skins.Load("c:\myskins")
See also
PresentationConverter Class
Skin Interface
iSpring SDK COM API