Add project files.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using Inspectron.Epson.PrintServer.PrintServices;
|
||||
|
||||
namespace Inspectron.Epson.PrintServer.ConfigurationSources;
|
||||
|
||||
public class EpsonPrintServiceConfiguration: IPrinterConfigurationSource, IAssignedPrinterRepository
|
||||
{
|
||||
public string GroupId { get; set; }
|
||||
public string RestaurantId { get; set; }
|
||||
|
||||
public Dictionary<string, PrinterConfiguration> PrinterConfigurations { get; set; }
|
||||
public PrinterConfiguration GetConfiguration(string printerAddress)
|
||||
{
|
||||
return PrinterConfigurations[printerAddress];
|
||||
}
|
||||
|
||||
public string? GetAssignedPrinter(string workAreaId)
|
||||
{
|
||||
return PrinterConfigurations.Values.Where(x => x.AreaId == workAreaId).Select(x=>x.Address).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Inspectron.Epson.PrintServer.PrintServices;
|
||||
|
||||
namespace Inspectron.Epson.PrintServer.ConfigurationSources;
|
||||
|
||||
public class FixedConfigurationSource: IPrinterConfigurationSource
|
||||
{
|
||||
public PrinterConfiguration GetConfiguration(string printerAddress)
|
||||
{
|
||||
return new PrinterConfiguration()
|
||||
{
|
||||
Address = "127.0.0.1:8888",
|
||||
FontSize = 1,
|
||||
LogoFilename = "test.png"
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user