Skip to content

Commit d363653

Browse files
committed
Adicionado documentação Xml.
Atualização de dependências. Corrigido erro ao usar impressoras summi.
1 parent bc9a841 commit d363653

108 files changed

Lines changed: 1817 additions & 454 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ jobs:
3434
- name: Setup .NET
3535
uses: actions/setup-dotnet@v4
3636
with:
37-
dotnet-version: '9.x'
37+
dotnet-version: |
38+
8.x
39+
9.x
3840
- run: dotnet msbuild OpenAC.Net.EscPos.sln -property:Configuration=Release -property:platform="Any CPU"
3941
working-directory: src
4042
- run: dotnet pack --configuration Release --output ${{ env.NuGetDirectory }}

src/OpenAC.Net.EscPos.Demo/Form1.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,8 @@ private void InitializeLog()
136136
Encoding = Encoding.UTF8,
137137
MaxArchiveFiles = 93,
138138
ArchiveEvery = FileArchivePeriod.Day,
139-
ArchiveNumbering = ArchiveNumberingMode.Date,
140-
ArchiveFileName = "${basedir}/Logs/Archive/${date:format=yyyy}/${date:format=MM}/EscPos_{{#}}.log",
141-
ArchiveDateFormat = "dd.MM.yyyy"
139+
ArchiveSuffixFormat = "dd.MM.yyyy",
140+
ArchiveFileName = "${basedir}/Logs/Archive/${date:format=yyyy}/${date:format=MM}/EscPos_{{#}}.log"
142141
};
143142

144143
config.AddTarget("infoFile", infoTarget);

src/OpenAC.Net.EscPos.Demo/OpenAC.Net.EscPos.Demo.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="NLog" Version="5.5.0" />
14+
<PackageReference Include="NLog" Version="6.0.0" />
1515
<PackageReference Include="NLog.Windows.Forms" Version="5.2.4" />
16-
<PackageReference Include="OpenAC.Net.Devices" Version="1.6.0" />
17-
<PackageReference Include="System.Text.Encoding.CodePages" Version="9.0.5" />
16+
<PackageReference Include="OpenAC.Net.Devices" Version="1.6.0.1" />
17+
<PackageReference Include="System.Text.Encoding.CodePages" Version="9.0.6" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

src/OpenAC.Net.EscPos/Command/BarcodeCommand.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,17 @@
3434

3535
namespace OpenAC.Net.EscPos.Command;
3636

37+
/// <summary>
38+
/// Representa um comando para impressão de código de barras.
39+
/// </summary>
3740
public sealed class BarcodeCommand : PrintCommand<BarcodeCommand>
3841
{
3942
#region Constructors
4043

44+
/// <summary>
45+
/// Inicializa uma nova instância da classe <see cref="BarcodeCommand"/>.
46+
/// </summary>
47+
/// <param name="interpreter">O interpretador ESC/POS a ser utilizado.</param>
4148
public BarcodeCommand(EscPosInterpreter interpreter) : base(interpreter)
4249
{
4350
}
@@ -46,16 +53,34 @@ public BarcodeCommand(EscPosInterpreter interpreter) : base(interpreter)
4653

4754
#region Properties
4855

56+
/// <summary>
57+
/// Obtém ou define o tipo do código de barras.
58+
/// </summary>
4959
public CmdBarcode Tipo { get; set; }
5060

61+
/// <summary>
62+
/// Obtém ou define o valor do código de barras.
63+
/// </summary>
5164
public string Code { get; set; } = "";
5265

66+
/// <summary>
67+
/// Obtém ou define se o texto será exibido junto ao código de barras.
68+
/// </summary>
5369
public CmdBarcodeText Exibir { get; set; } = CmdBarcodeText.SemTexto;
5470

71+
/// <summary>
72+
/// Obtém ou define o alinhamento do código de barras.
73+
/// </summary>
5574
public CmdAlinhamento Alinhamento { get; set; } = CmdAlinhamento.Esquerda;
5675

76+
/// <summary>
77+
/// Obtém ou define a altura do código de barras.
78+
/// </summary>
5779
public int Altura { get; set; } = 0;
5880

81+
/// <summary>
82+
/// Obtém ou define a largura do código de barras.
83+
/// </summary>
5984
public int Largura { get; set; } = 0;
6085

6186
#endregion Properties

src/OpenAC.Net.EscPos/Command/BeepCommand.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,17 @@
3333

3434
namespace OpenAC.Net.EscPos.Command;
3535

36+
/// <summary>
37+
/// Representa o comando de beep para impressoras ESC/POS.
38+
/// </summary>
3639
public sealed class BeepCommand : PrintCommand<BeepCommand>
3740
{
3841
#region Constructors
3942

43+
/// <summary>
44+
/// Inicializa uma nova instância da classe <see cref="BeepCommand"/>.
45+
/// </summary>
46+
/// <param name="interpreter">O interpretador ESC/POS associado.</param>
4047
public BeepCommand(EscPosInterpreter interpreter) : base(interpreter)
4148
{
4249
}

src/OpenAC.Net.EscPos/Command/CashDrawerCommand.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,17 @@
3434

3535
namespace OpenAC.Net.EscPos.Command;
3636

37+
/// <summary>
38+
/// Comando para controle da gaveta de dinheiro.
39+
/// </summary>
3740
public sealed class CashDrawerCommand : PrintCommand<CashDrawerCommand>
3841
{
3942
#region Constructors
4043

44+
/// <summary>
45+
/// Inicializa uma nova instância da classe <see cref="CashDrawerCommand"/>.
46+
/// </summary>
47+
/// <param name="interpreter">O interpretador ESC/POS a ser utilizado.</param>
4148
public CashDrawerCommand(EscPosInterpreter interpreter) : base(interpreter)
4249
{
4350
}
@@ -46,10 +53,19 @@ public CashDrawerCommand(EscPosInterpreter interpreter) : base(interpreter)
4653

4754
#region Properties
4855

56+
/// <summary>
57+
/// Obtém ou define a gaveta a ser acionada.
58+
/// </summary>
4959
public CmdGaveta Gaveta { get; set; }
5060

61+
/// <summary>
62+
/// Obtém ou define o tempo em milissegundos que a gaveta ficará energizada (ON).
63+
/// </summary>
5164
public byte TempoON { get; set; } = 50;
5265

66+
/// <summary>
67+
/// Obtém ou define o tempo em milissegundos que a gaveta ficará desligada (OFF).
68+
/// </summary>
5369
public byte TempoOFF { get; set; } = 200;
5470

5571
#endregion Properties

src/OpenAC.Net.EscPos/Command/CodePageCommand.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,17 @@
3434

3535
namespace OpenAC.Net.EscPos.Command;
3636

37+
/// <summary>
38+
/// Comando para definir a página de código (Code Page) da impressora.
39+
/// </summary>
3740
public sealed class CodePageCommand : PrintCommand<CodePageCommand>
3841
{
3942
#region Constructors
4043

44+
/// <summary>
45+
/// Inicializa uma nova instância da classe <see cref="CodePageCommand"/>.
46+
/// </summary>
47+
/// <param name="interpreter">O interpretador ESC/POS utilizado.</param>
4148
public CodePageCommand(EscPosInterpreter interpreter) : base(interpreter)
4249
{
4350
}
@@ -46,6 +53,9 @@ public CodePageCommand(EscPosInterpreter interpreter) : base(interpreter)
4653

4754
#region Properties
4855

56+
/// <summary>
57+
/// Obtém ou define a página de código a ser utilizada.
58+
/// </summary>
4959
public PaginaCodigo PaginaCodigo { get; set; } = PaginaCodigo.pc850;
5060

5161
#endregion Properties

src/OpenAC.Net.EscPos/Command/CutCommand.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,17 @@
3333

3434
namespace OpenAC.Net.EscPos.Command;
3535

36+
/// <summary>
37+
/// Representa o comando de corte de papel.
38+
/// </summary>
3639
public sealed class CutCommand : PrintCommand<CutCommand>
3740
{
3841
#region Constructors
3942

43+
/// <summary>
44+
/// Inicializa uma nova instância da classe <see cref="CutCommand"/>.
45+
/// </summary>
46+
/// <param name="interpreter">O interpretador ESC/POS.</param>
4047
public CutCommand(EscPosInterpreter interpreter) : base(interpreter)
4148
{
4249
}
@@ -45,6 +52,9 @@ public CutCommand(EscPosInterpreter interpreter) : base(interpreter)
4552

4653
#region Properties
4754

55+
/// <summary>
56+
/// Obtém ou define se o corte será parcial.
57+
/// </summary>
4858
public bool Parcial { get; set; } = false;
4959

5060
#endregion Properties

src/OpenAC.Net.EscPos/Command/EspacoEntreLinhasCommand.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,17 @@
3333

3434
namespace OpenAC.Net.EscPos.Command;
3535

36+
/// <summary>
37+
/// Comando para definir o espaçamento entre linhas na impressora.
38+
/// </summary>
3639
public sealed class EspacoEntreLinhasCommand : PrintCommand<EspacoEntreLinhasCommand>
3740
{
3841
#region Constructors
3942

43+
/// <summary>
44+
/// Inicializa uma nova instância de <see cref="EspacoEntreLinhasCommand"/>.
45+
/// </summary>
46+
/// <param name="interpreter">O interpretador ESC/POS associado.</param>
4047
public EspacoEntreLinhasCommand(EscPosInterpreter interpreter) : base(interpreter)
4148
{
4249
}
@@ -45,6 +52,9 @@ public EspacoEntreLinhasCommand(EscPosInterpreter interpreter) : base(interprete
4552

4653
#region Properties
4754

55+
/// <summary>
56+
/// Obtém ou define o espaçamento entre linhas em pontos.
57+
/// </summary>
4858
public byte Espaco { get; set; } = 0;
4959

5060
#endregion Properties

src/OpenAC.Net.EscPos/Command/IPrintCommand.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@
3131

3232
namespace OpenAC.Net.EscPos.Command;
3333

34+
/// <summary>
35+
/// Define o contrato para comandos de impressão, fornecendo o conteúdo em bytes.
36+
/// </summary>
3437
public interface IPrintCommand
3538
{
39+
/// <summary>
40+
/// Obtém o conteúdo do comando de impressão em formato de array de bytes.
41+
/// </summary>
3642
byte[] Content { get; }
3743
}

0 commit comments

Comments
 (0)