|
Programming Reference for VirtualLab Fusion
2026.1
|
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class providing support methods for loading & importing of files.
More...
Static Public Member Functions | |
| static string | AddExtension (string fileName, string extension) |
| Adds an extension to the given file name. | |
| static string | AppendDateTimeToFileName (string fileName) |
| Appends the date and the time to the end of the given file name. | |
| static IStorableOnHDD | GenericLoad (string fileName, out ListOfSavedViewSettings viewSettings) |
| Loads an object from HDD. | |
| static Bitmap | GetImageForDocumentType (DocumentType documentType) |
| Gets the type of the image matching the given document type. | |
| static void | ImportAndShowFile (string fileName) |
| Method to import various file types and show the imported data as new document. This method is not thread-safe. | |
| static bool | IsDoumentsWithoutViewSettingsSaveMechanism (Type typeOfFormDcoument) |
| Method which defined which types of document windows shall not use the saving algorithm for view settings. | |
| static IDocument | LoadDocument (string fileName) |
| Loads a document, but not the corresponding view settings. | |
| static IDocument | LoadDocument (string fileName, out ListOfSavedViewSettings viewSettings) |
| Loads a document. | |
| static async void | LoadDocument_GUISupport (string fileName, string documentName="", bool addToRecentFileList=true) |
| Loads a document to the GUI asynchronously. This method does the following steps: | |
| static string | MakeFileNameValid (string fileName) |
| Makes the given file name valid, i.e. all characters not allowed in file names are replaced by an underscore. | |
| static void | OpenFolderInExplorer (string folder) |
| Opens the given folder in Windows File Explorer. | |
| static void | SaveCompressed (List< IStorableOnHDD > documentsToSave, string filePath) |
| Saves the given documents as a zip file. | |
| static void | SaveCompressed (this IStorableOnHDD documentToSave, string filePath, ListOfSavedViewSettings viewSettings=null) |
| Saves the given document as a zip file. | |
| static string[] | UnpackFile (string filePathArchive) |
| Unpacks the given zip file to a temporary folder. | |
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class providing support methods for loading & importing of files.
|
static |
Adds an extension to the given file name.
| fileName | The file name. |
| extension | The extension. |
|
static |
Appends the date and the time to the end of the given file name.
| fileName | The file name including path and extension. |
|
static |
Loads an object from HDD.
| fileName | The file name of the object to load. It is checked whether the file exists and whether the extension of that file is a supported document type of VirtualLab. |
| viewSettings | Out parameter to return the view settings (e.g. size of the document window) saved together with the actual document. |
null if no view settings were stored alongside the actual object.
|
static |
Gets the type of the image matching the given document type.
| documentType | The document type for which the matching image shall be returned. |
| System.ArgumentException | No suitable image could be found for the given document type. |
|
static |
Method to import various file types and show the imported data as new document. This method is not thread-safe.
| fileName | The full name including the path of the file to be imported. |
| FileLoadException | File format unsupported |
|
static |
Method which defined which types of document windows shall not use the saving algorithm for view settings.
| typeOfFormDcoument | The type of the corresponding document window. |
True for IFTA Optimization and module documents as these do not support the view settings mechanism.
|
static |
Loads a document, but not the corresponding view settings.
| fileName | The file name of the document to load. It is checked whether the file exists and whether the extension of that file is a supported document type of VirtualLab. |
|
static |
Loads a document.
| fileName | The file name of the document to load. It is checked whether the file exists and whether the extension of that file is a supported document type of VirtualLab. |
| viewSettings | Out parameter to return the view settings (e.g. size of the document window) saved together with the actual document. |
|
static |
Loads a document to the GUI asynchronously. This method does the following steps:
| fileName | The file name of the document to load. It is checked whether the file exists and whether the extension of that file is a supported document type of VirtualLab. |
| documentName | If this optional parameter is specified it gives the caption of the document. Otherwise the file name is used to this end. |
| addToRecentFileList | By default the loaded document is added to the list of recently used files. However if you set this optional parameter to false, this is not the case. |
| ArgumentException | No main form is given. |
|
static |
Makes the given file name valid, i.e. all characters not allowed in file names are replaced by an underscore.
| fileName | The file name to make valid. |
|
static |
Opens the given folder in Windows File Explorer.
| folder | The folder to open. |
|
static |
Saves the given documents as a zip file.
| documentsToSave | The documents to save. |
| filePath | The file path under which the document shall be saved. |
|
static |
Saves the given document as a zip file.
| documentToSave | The document to save. |
| filePath | The file path under which the document shall be saved. |
| viewSettings | If this optional parameter is set, the given view settings are also stored in the compressed file. |
|
static |
Unpacks the given zip file to a temporary folder.
| filePathArchive | The complete file path of the archive file. |