Class Software
Class to handle software distribution
Inherited Members
Namespace: Virinco.WATS.Interface.MES.Software
Assembly: Virinco.WATS.Interface.MES.dll
Syntax
public class Software : MesBase
Methods
DeleteAllPackages(Boolean)
Method to clean file distribution root folder
Declaration
public void DeleteAllPackages(bool PromptOperator = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | PromptOperator | Display a OK/Cancel dialog |
DeleteRevokedPackages(Boolean)
Delete revoked packages. Only revoked packages without a released version are deleted (packages without a new released verison)
Declaration
public void DeleteRevokedPackages(bool PromptOperator = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | PromptOperator | Display a OK/Cancel dialog |
GetAvailablePackages(out Boolean)
Check server for new version of installed packages
Declaration
public Package[] GetAvailablePackages(out bool PackagesAvailable)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | PackagesAvailable | boolean value if new packages exists |
Returns
Type | Description |
---|---|
Virinco.WATS.Service.MES.Contract.Package[] | Array of available packages |
GetPackageByName(String, Boolean, Boolean, Boolean, out List<FileInfo>, out List<FileInfo>, StatusEnum)
Get Packages with a given name.
Declaration
public Package GetPackageByName(string PackageName, bool Install, bool DisplayProgress, bool WaitForExecution, out List<FileInfo> ExecuteFiles, out List<FileInfo> TopLevelSequences, StatusEnum PackageStatus = StatusEnum.Released)
Parameters
Type | Name | Description |
---|---|---|
System.String | PackageName | Name of Package |
System.Boolean | Install | Install Package? |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finsish |
System.Collections.Generic.List<System.IO.FileInfo> | ExecuteFiles | List of files beeing executed |
System.Collections.Generic.List<System.IO.FileInfo> | TopLevelSequences | List of toplevel sequences |
Virinco.WATS.Service.MES.Contract.StatusEnum | PackageStatus | Status of package to get |
Returns
Type | Description |
---|---|
Virinco.WATS.Service.MES.Contract.Package |
GetPackageByName(String, Boolean, Boolean, Boolean, StatusEnum)
Get Packages with a given name
Declaration
public Package GetPackageByName(string PackageName, bool Install = true, bool DisplayProgress = true, bool WaitForExecution = true, StatusEnum PackageStatus = StatusEnum.Released)
Parameters
Type | Name | Description |
---|---|---|
System.String | PackageName | Name of Package |
System.Boolean | Install | Install Package? |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finsish |
Virinco.WATS.Service.MES.Contract.StatusEnum | PackageStatus | Status of package to get |
Returns
Type | Description |
---|---|
Virinco.WATS.Service.MES.Contract.Package |
GetPackages(String, String, String, String, String, String, Boolean, Boolean, Boolean, StatusEnum)
Get Package by default tags. Default value (null) will skip tag.
Declaration
public Package[] GetPackages(string PartNumber = null, string Process = null, string StationType = null, string Revision = null, string StationName = null, string Misc = null, bool Install = true, bool DisplayProgress = true, bool WaitForExecution = true, StatusEnum PackageStatus = StatusEnum.Released)
Parameters
Type | Name | Description |
---|---|---|
System.String | PartNumber | Tagged with a given PartNumber |
System.String | Process | Tagged with a given Process |
System.String | StationType | Tagged with a given StationType |
System.String | Revision | Tagged with a given Revision |
System.String | StationName | Tagged with a given Staion Name |
System.String | Misc | Tagged with a given Misc value |
System.Boolean | Install | Install Package? |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finsish |
Virinco.WATS.Service.MES.Contract.StatusEnum | PackageStatus | Status of package to get |
Returns
Type | Description |
---|---|
Virinco.WATS.Service.MES.Contract.Package[] |
GetPackagesByTag(Dictionary<String, String>, Boolean, Boolean, Boolean, out List<FileInfo>, out List<FileInfo>, StatusEnum)
Returns Packages matching a dictionary of Tag/Values.
Declaration
public Package[] GetPackagesByTag(Dictionary<string, string> TagValue, bool Install, bool DisplayProgress, bool WaitForExecution, out List<FileInfo> ExecuteFiles, out List<FileInfo> TopLevelSequences, StatusEnum PackageStatus = StatusEnum.Released)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | TagValue | |
System.Boolean | Install | Install Package? |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finsish |
System.Collections.Generic.List<System.IO.FileInfo> | ExecuteFiles | List of files beeing executed |
System.Collections.Generic.List<System.IO.FileInfo> | TopLevelSequences | List of toplevel sequences |
Virinco.WATS.Service.MES.Contract.StatusEnum | PackageStatus | Status of package to get |
Returns
Type | Description |
---|---|
Virinco.WATS.Service.MES.Contract.Package[] |
GetPackagesByTag(Dictionary<String, String>, Boolean, Boolean, Boolean, StatusEnum)
Returns Packages matching a dictionary of Tag/Values.
Declaration
public Package[] GetPackagesByTag(Dictionary<string, string> TagValue, bool Install, bool DisplayProgress, bool WaitForExecution, StatusEnum PackageStatus = StatusEnum.Released)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | TagValue | |
System.Boolean | Install | Install Package? |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finsish |
Virinco.WATS.Service.MES.Contract.StatusEnum | PackageStatus | Status of package to get |
Returns
Type | Description |
---|---|
Virinco.WATS.Service.MES.Contract.Package[] |
GetPackagesByTag(String, Boolean, Boolean, Boolean, StatusEnum)
Get an array of Packages.
Declaration
public Package[] GetPackagesByTag(string XPath, bool Install = true, bool DisplayProgress = true, bool WaitForExecution = true, StatusEnum PackageStatus = StatusEnum.Released)
Parameters
Type | Name | Description |
---|---|---|
System.String | XPath | Return Packages with a Tag matching the XPath |
System.Boolean | Install | Install Package? |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finsish |
Virinco.WATS.Service.MES.Contract.StatusEnum | PackageStatus | Status of package to get |
Returns
Type | Description |
---|---|
Virinco.WATS.Service.MES.Contract.Package[] |
GetPackagesByTag(String, out List<FileInfo>, out List<FileInfo>, Boolean, Boolean, Boolean, StatusEnum)
Get an array of Packages.
Declaration
public Package[] GetPackagesByTag(string XPath, out List<FileInfo> ExecuteFiles, out List<FileInfo> TopLevelSequences, bool Install = true, bool DisplayProgress = true, bool WaitForExecution = true, StatusEnum PackageStatus = StatusEnum.Released)
Parameters
Type | Name | Description |
---|---|---|
System.String | XPath | Return Packages with a Tag matching the XPath |
System.Collections.Generic.List<System.IO.FileInfo> | ExecuteFiles | List of files beeing executed |
System.Collections.Generic.List<System.IO.FileInfo> | TopLevelSequences | List of toplevel sequences |
System.Boolean | Install | Install Package? |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finsish |
Virinco.WATS.Service.MES.Contract.StatusEnum | PackageStatus | Status of package to get |
Returns
Type | Description |
---|---|
Virinco.WATS.Service.MES.Contract.Package[] |
GetPackagesByTag(String[], String[], Boolean, Boolean, Boolean, out List<FileInfo>, out List<FileInfo>, StatusEnum)
Returns Packages matching array of Tag/Values.
Declaration
public Package[] GetPackagesByTag(string[] tagNames, string[] tagValues, bool Install, bool DisplayProgress, bool WaitForExecution, out List<FileInfo> ExecuteFiles, out List<FileInfo> TopLevelSequences, StatusEnum PackageStatus = StatusEnum.Released)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | tagNames | Array of tags to match (the tag value should be located on identical index in the tagValues array) |
System.String[] | tagValues | Array of tagvalues to match (the tag name should be placed on the identical index in the tagNames array) |
System.Boolean | Install | Install Package? |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finsish |
System.Collections.Generic.List<System.IO.FileInfo> | ExecuteFiles | List of files beeing executed |
System.Collections.Generic.List<System.IO.FileInfo> | TopLevelSequences | List of toplevel sequences |
Virinco.WATS.Service.MES.Contract.StatusEnum | PackageStatus | Status of package to get |
Returns
Type | Description |
---|---|
Virinco.WATS.Service.MES.Contract.Package[] |
GetRevokedPackages(String[], String[], out Package, out Boolean, out List<FileInfo>, out List<FileInfo>)
Returns an array of revoked packages matching the tags. All package versions are included
Declaration
public Package[] GetRevokedPackages(string[] tagNames, string[] tagValues, out Package SelectedPackage, out bool Continue, out List<FileInfo> ExecuteFiles, out List<FileInfo> TopLevelSequences)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | tagNames | Array of tags |
System.String[] | tagValues | Array of tag values matching index of the tagnames array |
Virinco.WATS.Service.MES.Contract.Package | SelectedPackage | The selected package (from GUI) |
System.Boolean | Continue | True if a package is selected (from Gui) |
System.Collections.Generic.List<System.IO.FileInfo> | ExecuteFiles | Array of executable files in selected package |
System.Collections.Generic.List<System.IO.FileInfo> | TopLevelSequences | Array of toplevelsequencefiles in selected package |
Returns
Type | Description |
---|---|
Virinco.WATS.Service.MES.Contract.Package[] | Matching Packages |
GetRootFolderPath()
Returns the local Root Folder path where software packages are installed
Declaration
public static string GetRootFolderPath()
Returns
Type | Description |
---|---|
System.String |
InstallPackage(Package, Boolean, Boolean)
Install a given package (overwriting modified files).
Declaration
public void InstallPackage(Package package, bool DisplayProgress, bool WaitForExecution)
Parameters
Type | Name | Description |
---|---|---|
Virinco.WATS.Service.MES.Contract.Package | package | Package to install |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finsish |
InstallPackage(Package, Boolean, Boolean, out List<FileInfo>, out List<FileInfo>)
Install a given package (overwriting modified files). Getting files to filesystem and executing files being marked for execution
Declaration
public void InstallPackage(Package package, bool DisplayProgress, bool WaitForExecution, out List<FileInfo> ExecuteFiles, out List<FileInfo> TopLevelSequences)
Parameters
Type | Name | Description |
---|---|---|
Virinco.WATS.Service.MES.Contract.Package | package | Package to install |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finsish |
System.Collections.Generic.List<System.IO.FileInfo> | ExecuteFiles | List of files beeing tagged for execution |
System.Collections.Generic.List<System.IO.FileInfo> | TopLevelSequences | List of files being tagged as top level sequence |
InstallPackage(Package[], Boolean, Boolean)
Install an array of Packages. Getting files to filesystem and executing files being marked for execution
Declaration
public void InstallPackage(Package[] packages, bool DisplayProgress, bool WaitForExecution)
Parameters
Type | Name | Description |
---|---|---|
Virinco.WATS.Service.MES.Contract.Package[] | packages | Packages to install |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finsish |
InstallPackage(Package[], Boolean, Boolean, out List<FileInfo>, out List<FileInfo>)
Install an array of Packages. Getting files to filesystem and executing files being marked for execution
Declaration
public void InstallPackage(Package[] packages, bool DisplayProgress, bool WaitForExecution, out List<FileInfo> ExecuteFiles, out List<FileInfo> TopLevelSequences)
Parameters
Type | Name | Description |
---|---|---|
Virinco.WATS.Service.MES.Contract.Package[] | packages | Packages to install |
System.Boolean | DisplayProgress | Display a progressbar when files are downloaded |
System.Boolean | WaitForExecution | Wait for for executed files to finish |
System.Collections.Generic.List<System.IO.FileInfo> | ExecuteFiles | List of files being tagged for execution |
System.Collections.Generic.List<System.IO.FileInfo> | TopLevelSequences | List of files being tagged as top level sequence |
isConnected()
True if connected to server
Declaration
public bool isConnected()
Returns
Type | Description |
---|---|
System.Boolean |
SetRootFolderPath(String, Boolean)
Set path to local software root folder, where packages will be installed.
Declaration
public static void SetRootFolderPath(string rootFolderPath, bool moveExistingPackages = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | rootFolderPath | Path to the new folder packages will be installed into. Must be an absolute path, and should be an empty folder. NB! Existing files in the folder may be overwritten by packages. |
System.Boolean | moveExistingPackages | Choose to move packages files to the new folder. May fail if folder or file with same name as a package already exists in the new folder. If files are not moved, installed packages will stop working until they are reinstalled. NB! If the current root folder does not only contain packages, those files will also be moved. |