Ejemplo n.º 1
0
        public static byte[] CreatePasteTextBlackMarkData(StarIoExtEmulation emulation, LocalizeReceipts.ILocalizeReceipts localizeReceipts, string text, bool doubleHeight, BlackMarkType type, bool utf8)
        {
            ICommandBuilder commandBuilder = Extension.CreateCommandBuilder(emulation);

            commandBuilder.BeginDocument();

            commandBuilder.AppendBlackMark(type);

            if (doubleHeight)
            {
                commandBuilder.AppendMultipleHeight(2);

                localizeReceipts.AppendPasteTextLabelData(commandBuilder, text, utf8);

                commandBuilder.AppendMultipleHeight(1);
            }
            else
            {
                localizeReceipts.AppendPasteTextLabelData(commandBuilder, text, utf8);
            }

            commandBuilder.AppendCutPaper(CutPaperAction.PartialCutWithFeed);

//          commandBuilder.AppendBlackMark(BlackMarkType.Invalid);

            commandBuilder.EndDocument();

            return(commandBuilder.Commands);
        }
Ejemplo n.º 2
0
        public static byte[] CreatePasteTextBlackMarkData(Emulation emulation, LocalizeReceipt localizeReceipt, string pasteText, bool doubleHeight, BlackMarkType type, bool utf8)
        {
            ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation);

            builder.BeginDocument();

            builder.AppendBlackMark(type);

            if (doubleHeight)
            {
                builder.AppendMultipleHeight(2);

                localizeReceipt.AppendPasteTextLabelData(builder, pasteText, utf8);

                builder.AppendMultipleHeight(1);
            }
            else
            {
                localizeReceipt.AppendPasteTextLabelData(builder, pasteText, utf8);
            }

            builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed);

            builder.EndDocument();

            return(builder.Commands);
        }
Ejemplo n.º 3
0
        public static byte[] CreateTextBlackMarkData(Emulation emulation, LocalizeReceipt localizeReceipt, BlackMarkType type, bool utf8)
        {
            ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation);

            builder.BeginDocument();

            builder.AppendBlackMark(type);

            localizeReceipt.AppendTextLabelData(builder, utf8);

            builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed);

            builder.EndDocument();

            return(builder.Commands);
        }
Ejemplo n.º 4
0
        public static byte[] CreateTextBlackMarkData(StarIoExtEmulation emulation, LocalizeReceipts.ILocalizeReceipts localizeReceipts, BlackMarkType type, bool utf8)
        {
            ICommandBuilder commandBuilder = Extension.CreateCommandBuilder(emulation);

            commandBuilder.BeginDocument();

            commandBuilder.AppendBlackMark(type);

            localizeReceipts.AppendTextLabelData(commandBuilder, utf8);

            commandBuilder.AppendCutPaper(CutPaperAction.PartialCutWithFeed);

//          commandBuilder.AppendBlackMark(BlackMarkType.Invalid);

            commandBuilder.EndDocument();

            return(commandBuilder.Commands);
        }
Ejemplo n.º 5
0
        public static byte[] CreateBlackMarkData(Emulation emulation, BlackMarkType type)
        {
            byte[] data = Encoding.UTF8.GetBytes("Hello World.\n");

            ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation);

            builder.BeginDocument();

            builder.AppendBlackMark(type);

            builder.Append(data);

            builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed);

            //builder.AppendBlackMark(BlackMarkType.Invalid);

            builder.EndDocument();

            return(builder.Commands);
        }