此方法已在 Linux 和 Windows 的 FRE 中實作。
語法
C++
C#
Visual Basic .NET
參數
回傳值
備註
範例
C# 程式碼
C# 程式碼
HRESULT IsEmpty( VARIANT_BOOL* Result );
bool IsEmpty();
Function IsEmpty() As Boolean
C# 程式碼
// 自訂影像來源的範例實作,用於維護影像檔案佇列
public class ImageSourceCallback : FREngine.IImageSource
{
public ImageSourceCallback( string imageFilesDirectory )
{
imageFiles = ImageSourceHelper.LoadFilesNames( imageFilesDirectory );
nextFileIndex = 0;
}
public bool IsEmpty()
{
return nextFileIndex >= imageFiles.Length;
}
public FREngine.IFileAdapter GetNextImageFile()
{
if( !IsEmpty() ) {
return new FileAdapterCallback( imageFiles[nextFileIndex++] );
}
return null;
}
public FREngine.IImageDocument GetNextImageDocument()
{
...
}
private string[] imageFiles;
private int nextFileIndex;
}
public class FileAdapterCallback : FREngine.IFileAdapter
{
...
}
public class ImageSourceHelper
{
...
}
這個頁面有幫助嗎?