EPSON in base class

This commit is contained in:
Djeeberjr 2022-02-18 19:32:13 +01:00
parent 0d18ab2651
commit ceee567981
3 changed files with 2 additions and 3 deletions

View File

@ -27,7 +27,6 @@ public class BarcodeInstruction : BaseInstruction
public override List<byte[]> GetInstructions() public override List<byte[]> GetInstructions()
{ {
var e = new EPSON();
var commands = new List<byte[]>(); var commands = new List<byte[]>();
// if (width != BarWidth.Default) // if (width != BarWidth.Default)

View File

@ -8,6 +8,8 @@ public abstract class BaseInstruction
public abstract List<byte[]> GetInstructions(); public abstract List<byte[]> GetInstructions();
protected EPSON e = new EPSON();
protected byte[] alignmentCommand(Alignment alignment){ protected byte[] alignmentCommand(Alignment alignment){
var e = new EPSON(); var e = new EPSON();
switch (alignment) switch (alignment)

View File

@ -21,7 +21,6 @@ public class TextInstruction : BaseInstruction
public override List<byte[]> GetInstructions() public override List<byte[]> GetInstructions()
{ {
var e = new EPSON();
var commands = new List<byte[]>(); var commands = new List<byte[]>();
commands.Add(alignmentCommand(alignment)); commands.Add(alignmentCommand(alignment));
@ -45,7 +44,6 @@ public class TextInstruction : BaseInstruction
} }
private List<byte[]> setStyles(){ private List<byte[]> setStyles(){
var e = new EPSON();
var commands = new List<byte[]>(); var commands = new List<byte[]>();
if (underline){ if (underline){
commands.Add(e.SetStyles(PrintStyle.Underline)); commands.Add(e.SetStyles(PrintStyle.Underline));