Initial commit

Initial commit til Git.
V2 er deployed
This commit is contained in:
2026-06-13 17:31:50 +02:00
parent 9fcd2b145e
commit 41e23b6184
375 changed files with 15956 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
using System.IO;
namespace ESCPOS_NET
{
public class FilePrinter : BasePrinter
{
private readonly FileStream _file;
// TODO: default values to their default values in ctor.
public FilePrinter(string filePath, bool createIfNotExists = false)
: base()
{
if (createIfNotExists)
{
_file = File.Open(filePath, FileMode.OpenOrCreate);
}
else
{
_file = File.Open(filePath, FileMode.Open);
}
Writer = new BinaryWriter(_file);
Reader = new BinaryReader(_file);
}
~FilePrinter()
{
Dispose(false);
}
protected override void OverridableDispose()
{
_file?.Close();
_file?.Dispose();
}
}
}