printer-api/Instructions/FeedInstruction.cs

20 lines
350 B
C#
Raw Normal View History

2022-02-19 13:06:07 +00:00
public class FeedInstruction : BaseInstruction
{
2022-02-19 13:12:19 +00:00
public int lines {get; set; } = 0;
public int dots {get; set; } = 0;
2022-02-19 13:06:07 +00:00
public override List<byte[]> GetInstructions()
{
var commands = new List<byte[]>();
2022-02-19 13:12:19 +00:00
if (lines > 0){
commands.Add(e.FeedLines(lines));
}
if (dots > 0){
commands.Add(e.FeedDots(dots));
}
2022-02-19 13:06:07 +00:00
return commands;
}
}