Пример #1
0
        /// <summary>
        /// Sample : Creating printing receipt with black mark commands.
        /// </summary>
        public static byte[] CreateLocalizeReceiptWithBlackMarkCommands(ReceiptInformationManager receiptInfo)
        {
            // Your printer emulation.
            Emulation emulation = SharedInformationManager.GetSelectedEmulation();

            // Select black mark type.
            BlackMarkType blackMarkType = SharedInformationManager.GetSelectedBlackMarkType();

            // Creating localize receipt commands sample is in "LocalizeReceipts/'Language'Receipt.cs"
            ReceiptInformationManager.ReceiptType type = receiptInfo.Type;
            LocalizeReceipt localizeReceipt            = receiptInfo.LocalizeReceipt;

            byte[] commands;

            switch (receiptInfo.Type)
            {
            default:
            case ReceiptInformationManager.ReceiptType.Text:
                commands = PrinterFunctions.CreateTextBlackMarkData(emulation, localizeReceipt, blackMarkType, false);
                break;
            }

            return(commands);
        }