Class PrinterManager
Class to work with Windows and simplic printer
Inheritance
System.Object
PrinterManager
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.Printing
Assembly: Simplic.Printing.dll
Syntax
public class PrinterManager
Properties
| Improve this Doc View SourceSingleton
Singleton PrinterManager to get and save configuration and other global stuff
Declaration
public static PrinterManager Singleton { get; }
Property Value
Type | Description |
---|---|
PrinterManager |
Methods
| Improve this Doc View SourceGetConfiguration(Guid)
Get a printer and it's configuration
Declaration
public Printer GetConfiguration(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Get a printer by unique id |
Returns
Type | Description |
---|---|
Printer | If found an instance of a printer will be returned |
GetConfiguration(String)
Get a printer and it's configuration. Null or whitespaces are not allowed as printer name
Declaration
public Printer GetConfiguration(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Get Printer by unique name |
Returns
Type | Description |
---|---|
Printer | If found an instance of a printer will be returned |
GetDevices()
Get a list of all available printer devices on the current maschine
Declaration
public static IList<PrinterDevice> GetDevices()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<PrinterDevice> | List of devices. If no found an empty list will be returned |
Initialize(IPrinterConfigurationProvider)
Initialize the printer system
Declaration
public void Initialize(IPrinterConfigurationProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IPrinterConfigurationProvider | provider | Instance of a printer provider. For example this is implemented in Simplic.Framework.dll under the printer section |
SaveConfiguration(Printer)
Save a printer in the database
Declaration
public void SaveConfiguration(Printer configuration)
Parameters
Type | Name | Description |
---|---|---|
Printer | configuration | Instance of a printer |