コード例 #1
0
        /// <summary>
        /// Add line of text to the printer buffer.
        /// </summary>
        /// <param name="alignment">Text alignment.</param>
        /// <param name="fontSize">Font size.</param>
        /// <param name="text">Text to print.</param>
        /// <param name="args">Arguments to the text to print.</param>
        /// <returns>Itself.</returns>
        public IPinpadPrinter AppendLine(PrinterAlignmentCode alignment,
                                         PrinterFontSize fontSize, string text, params object[] args)
        {
            PrinterItem newLine = new PrinterItem
            {
                Type      = IngenicoPrinterAction.PrintText,
                Text      = this.GetNormalizedText(string.Format(text, args)),
                Alignment = alignment,
                FontSize  = fontSize
            };

            this.ItemsToPrint.Add(newLine);

            return(this);
        }