C# Class OpenBveApi.Packages.Manipulation

Provides functions for manipulating OpenBVE packages
Afficher le fichier Open project: leezer3/OpenBVE

Méthodes publiques

Méthode 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 méthode

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
Résultat void

ExtractPackage() public static méthode

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)
Résultat void

OnProblemReport() public static méthode

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

OnProgressChanged() public static méthode

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

ReadPackage() public static méthode

Reads the information of the selected package
public static ReadPackage ( string packageFile ) : Package
packageFile string
Résultat Package

UninstallPackage() public static méthode

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
Résultat bool