C# Class OpenBveApi.Packages.Manipulation

Provides functions for manipulating OpenBVE packages
Exibir arquivo Open project: leezer3/OpenBVE

Public Methods

Method Description
CreatePackage ( Package currentPackage, CompressionType compressionType, string packageFile, string packageImage, List packageFiles ) : void

Creates a new packaged archive

ExtractPackage ( Package currentPackage, string extractionDirectory, string databaseFolder, string &packageFiles ) : void

This extracts a package, and returns the list of extracted files

OnProblemReport ( object sender, ProblemReport problemReport ) : void

This is called whenever the progress changes

OnProgressChanged ( object sender, ProgressReport progressReport ) : void

This is called whenever the progress changes

ReadPackage ( string packageFile ) : Package

Reads the information of the selected package

UninstallPackage ( Package currentPackage, string databaseFolder, string &PackageFiles ) : bool

Uninstalls a package

Method Details

CreatePackage() public static method

Creates a new packaged archive
public static CreatePackage ( Package currentPackage, CompressionType compressionType, string packageFile, string packageImage, List packageFiles ) : void
currentPackage Package The package data we wish to compress into an archive
compressionType CompressionType The compression type to use for this archive
packageFile string The filename to save the package as
packageImage string The path to the image for this package, if applicable
packageFiles List The list of files to save within the package
return void

ExtractPackage() public static method

This extracts a package, and returns the list of extracted files
public static ExtractPackage ( Package currentPackage, string extractionDirectory, string databaseFolder, string &packageFiles ) : void
currentPackage Package The package to extract
extractionDirectory string The directory to extract to
databaseFolder string The root package database folder
packageFiles string Returns via 'ref' a string containing a list of files in the package (Used to update the dialog)
return void

OnProblemReport() public static method

This is called whenever the progress changes
public static OnProblemReport ( object sender, ProblemReport problemReport ) : void
sender object
problemReport ProblemReport
return void

OnProgressChanged() public static method

This is called whenever the progress changes
public static OnProgressChanged ( object sender, ProgressReport progressReport ) : void
sender object
progressReport ProgressReport
return void

ReadPackage() public static method

Reads the information of the selected package
public static ReadPackage ( string packageFile ) : Package
packageFile string
return Package

UninstallPackage() public static method

Uninstalls a package
public static UninstallPackage ( Package currentPackage, string databaseFolder, string &PackageFiles ) : bool
currentPackage Package The package to uninstall
databaseFolder string The package database folder
PackageFiles string Returns via 'ref' a list of files uninstalled
return bool