21 lines
671 B
C#
21 lines
671 B
C#
using Inspectron.Epson.PrintServer.PrintServices;
|
|
|
|
namespace Inspectron.Epson.PrintServer.Printers;
|
|
|
|
public class PrinterFactory:IPrinterFactory
|
|
{
|
|
public IPrinter CreatePrinterFromId(byte printerId, EpsonPrinter epsonPrinter)
|
|
{
|
|
switch (printerId)
|
|
{
|
|
case 0x13:
|
|
return new TM_U220IITranslated(epsonPrinter);
|
|
case 0x0D:
|
|
return new TM_U220IITranslated(epsonPrinter);
|
|
case 0x01:
|
|
return new TM_T30IIITranslated(epsonPrinter);
|
|
default:
|
|
throw new NotSupportedException($"Printer with ID {printerId:X2} is not supported.");
|
|
}
|
|
}
|
|
} |