private static void SaveMultipageArt(ImGearARTPage[] igARTPages, string XmlFilePath)
{
using (FileStream fileContent = new FileStream(XmlFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite))
{
for (int i = 0; i < igARTPages.Length; i++)
{
if (igARTPages[i] != null)
{
//Must seek to the start of the stream before saving each ImGearARTPage
// to a multipage XML ART file using ImGearSavingModes.APPEND
fileContent.Position = 0;
ImGearART.SavePage(igARTPages[i], fileContent, i, ImGearSavingModes.APPEND, ImGearARTSaveType.XML);
}
}
}
}
Sub SaveMultipageArt(ByVal igARTPages() As ImGearARTPage, ByVal XmlFilePath As String)
Dim fileContent As FileStream
fileContent = Nothing
Try
fileContent = New FileStream(XmlFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite)
For i As Integer = 0 To igARTPages.Length - 1
If (Not (igARTPages(i) Is Nothing)) Then
'Must seek to the start of the stream before saving each ImGearARTPage
' to a multipage XML ART file using ImGearSavingModes.APPEND
fileContent.Position = 0
ImGearART.SavePage(igARTPages(i), fileContent, i, ImGearSavingModes.APPEND, ImGearARTSaveType.XML)
End If
Next
Finally
If Not fileContent Is Nothing Then
fileContent.Close()
End If
End Try
End Sub