using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace EpsonPrinter.Services { public class PrintString { /// /// An appropriate interval is converted into the length of /// the tab about two texts. And make a printing data. /// /// /// The width of the territory which it prints on is converted into the number of /// characters, and that value is specified. /// /// /// It is necessary as an information for deciding the interval of the text. /// /// /// It is necessary as an information for deciding the interval of the text, too. /// /// printing data. /// 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; } } }