Files
point_of_sale/PointOfSale/EpsonPrinterLinux/Services/PrintString.cs
Bjarne Pedersen 41e23b6184 Initial commit
Initial commit til Git.
V2 er deployed
2026-06-13 17:31:50 +02:00

45 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace EpsonPrinter.Services
{
public class PrintString
{
/// <summary>
/// An appropriate interval is converted into the length of
/// the tab about two texts. And make a printing data.
/// </summary>
/// <param name="iLineChars">
/// The width of the territory which it prints on is converted into the number of
/// characters, and that value is specified.
/// </param>
/// <param name="strBuf">
/// It is necessary as an information for deciding the interval of the text.
/// </param>
/// <param name="strPrice">
/// It is necessary as an information for deciding the interval of the text, too.
/// </param>
/// <returns>printing data.
/// </returns>
public String MakePrintString(int iLineChars, String strBuf, String strPrice)
{
int iSpaces = 0;
String tab = "";
try
{
iSpaces = iLineChars - (strBuf.Length + strPrice.Length);
for (int j = 0; j < iSpaces; j++)
{
tab += " ";
}
}
catch (Exception)
{
}
return strBuf + tab + strPrice;
}
}
}