- DataSourceType protocol = fileName.startsWith("http:")
- ? DataSourceType.URL
- : DataSourceType.FILE;
- AlignFrame newframe = loader.LoadFileWaitTillLoaded(fileName,
- protocol, currentFileFormat);
+
+ AlignFrame newframe = null;
+
+ if (fileObject == null)
+ {
+
+ DataSourceType protocol = (fileName.startsWith("http:")
+ ? DataSourceType.URL : DataSourceType.FILE);
+ newframe = loader.LoadFileWaitTillLoaded(fileName, protocol,
+ currentFileFormat);
+ }
+ else
+ {
+ newframe = loader.LoadFileWaitTillLoaded(fileObject, DataSourceType.FILE, currentFileFormat);
+ }