diff --git a/Instructions/BarcodeInstruction.cs b/Instructions/BarcodeInstruction.cs index 8e31482..cb3533b 100644 --- a/Instructions/BarcodeInstruction.cs +++ b/Instructions/BarcodeInstruction.cs @@ -27,7 +27,6 @@ public class BarcodeInstruction : BaseInstruction public override List GetInstructions() { - var e = new EPSON(); var commands = new List(); // if (width != BarWidth.Default) diff --git a/Instructions/BaseInstruction.cs b/Instructions/BaseInstruction.cs index 0fa2f00..dfbb373 100644 --- a/Instructions/BaseInstruction.cs +++ b/Instructions/BaseInstruction.cs @@ -8,6 +8,8 @@ public abstract class BaseInstruction public abstract List GetInstructions(); + protected EPSON e = new EPSON(); + protected byte[] alignmentCommand(Alignment alignment){ var e = new EPSON(); switch (alignment) diff --git a/Instructions/TextInstruction.cs b/Instructions/TextInstruction.cs index 820ef1e..2bb9fc7 100644 --- a/Instructions/TextInstruction.cs +++ b/Instructions/TextInstruction.cs @@ -21,7 +21,6 @@ public class TextInstruction : BaseInstruction public override List GetInstructions() { - var e = new EPSON(); var commands = new List(); commands.Add(alignmentCommand(alignment)); @@ -45,7 +44,6 @@ public class TextInstruction : BaseInstruction } private List setStyles(){ - var e = new EPSON(); var commands = new List(); if (underline){ commands.Add(e.SetStyles(PrintStyle.Underline));