Scopo
Restituisce il numero di fotografie presenti nell'album indicato all'interno del rullino del dispositivo. Questa funzione viene normalmente utilizzata insieme alle funzioni GetPhotoID, GetPhotoDateTime, GetPhotoThumbnail e GetPhoto per navigare nel rullino del dispositivo.
Sintassi
int num = 0 // Numero foto nell'album
//
num = Shell.getPhotoCount(album)
//
num = Shell.getPhotoCount(album)
Argomenti
| album | È un parametro di tipo stringa il cui valore deve essere il nome di uno degli album presenti nel rullino del dispositivo. Normalmente viene utilizzato assieme alla funzione GetAlbumID per navigare in un album del rullino del dispositivo. |
Valore di ritorno
Viene restituito il numero di foto presenti nell'album specificato. Se l'applicazione viene utilizzata fuori dalla shell nativa, la funzione restituisce il valore Null.
Esempio di codice
public void Rullino.ElencaFoto()
{
for (int alb = 0; alb < Shell.getAlbumCount(); alb = alb + 1)
{
string albumName = Shell.getAlbumID(alb)
for (int f = 0; f < Shell.getPhotoCount(albumName); f = f + 1)
{
string pictureID = Shell.getPhotoID(albumName, f)
string thumbPath = Shell.getPhotoThumbnail(albumName, pictureID, ...)
date time pictureDT = Shell.getPhotoDateTime(albumName, pictureID)
}
}
}
{
for (int alb = 0; alb < Shell.getAlbumCount(); alb = alb + 1)
{
string albumName = Shell.getAlbumID(alb)
for (int f = 0; f < Shell.getPhotoCount(albumName); f = f + 1)
{
string pictureID = Shell.getPhotoID(albumName, f)
string thumbPath = Shell.getPhotoThumbnail(albumName, pictureID, ...)
date time pictureDT = Shell.getPhotoDateTime(albumName, pictureID)
}
}
}
- La funzione può essere utilizzata unicamente in un'applicazione offline avviata dentro alla shell nativa. Se viene eseguita in una applicazione non offline (C#/Java) o in un'applicazione web offline fuori dalla shell nativa, il sistema genera un'eccezione.
Ultima modifica: 25/10/2016 / Validità: da 12.0.5200
funzione