Class Printer
Simplic Printer object, has nothing to do with a windows printer and represents a kind of abstract printer.
Inheritance
Namespace: Simplic.Printing
Assembly: Simplic.Printing.dll
Syntax
public class Printer : UI.MVC.ViewModelBase
Constructors
| Improve this Doc View SourcePrinter()
Create new printer
Declaration
public Printer()
Properties
| Improve this Doc View SourceDevice
Printer device which is connected with this simplic printer object or redirected from another printer This property is readonly, if a device has to be stored in the Printer-object, you have to use the DeviceNoRedirect
Declaration
public PrinterDevice Device { get; }
Property Value
Type | Description |
---|---|
PrinterDevice |
DeviceNoRedirect
Printer device which is connected with this simplic printer object
Declaration
public PrinterDevice DeviceNoRedirect { get; set; }
Property Value
Type | Description |
---|---|
PrinterDevice |
Id
Unique id of a simplic printer
Declaration
public Guid Id { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
IsRedirectable
Defines whether a redirection for the currnt printer can be established
Declaration
public bool IsRedirectable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
MachineDevice
Currently used machine device
Declaration
public PrinterDevice MachineDevice { get; set; }
Property Value
Type | Description |
---|---|
PrinterDevice |
Name
Unique name of the printer
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PrinterType
Printer type
Declaration
public PrinterType PrinterType { get; set; }
Property Value
Type | Description |
---|---|
PrinterType |
Redirection
Printer Redirection object. If it is not null, this printer will be used instead of this object instance
Declaration
public Printer Redirection { get; set; }
Property Value
Type | Description |
---|---|
Printer |
Methods
| Improve this Doc View SourceEquals(Object)
Override Equals for comapring Printer-Names
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Other to compare with |
Returns
Type | Description |
---|---|
System.Boolean | True if the obejcts are equal |
GetHashCode()
Override GetHashCode for valid hashcode generation for a printer
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | HashCode based on the printer name |
Print(IPrintable)
Print over the current printer. If printer redirection is enabled this will be used
Declaration
public void Print(IPrintable printable)
Parameters
Type | Name | Description |
---|---|---|
IPrintable | printable | Instance of a printable |
PrintNoRedirect(IPrintable)
Print without using printer redirection.
Declaration
public void PrintNoRedirect(IPrintable printable)
Parameters
Type | Name | Description |
---|---|---|
IPrintable | printable | Instance of a printable |