C#-EPSON转义序列"n";价值 [英] C# - EPSON Escape Sequences "n" value

查看:56
本文介绍了C#-EPSON转义序列"n";价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下代码:

I''m using the following code:

ASCIIEncoding ascii = new ASCIIEncoding();     
byte[] c = new byte[] { 0x1B, 0x47 }; //activates bold
String bold = ascii.GetString(c); 



但是仍然缺少某些东西...它是"n"值,让我指定它是否确实处于启用状态,因为默认值为n = 0;

在该指令中,像切纸这样的指令很容易,因为我只需要更改十六进制值,并且不需要"n"值即可.
但是在此特定说明中,我将需要"n",我不知道如何在此代码中应用它.



Yet there is something missing...it''s the "n" value that let''s me specify if it''s indeed on or not, since the default is n=0;

Instructions like cutting the paper is easy in that instruction, since I just have to change the hexadecimal value and it doesn''t need the "n" value to do so.
But in this particular instruction I''ll need the "n", which I don''t know how to apply in this code.

推荐答案

要激活它,我只需在其前面添加另一个十六进制值,以表明"n"值为1.

To activate it I just have to add another hexadecimal value in front of it, to indicate that the "n" value is 1.

byte[] c = new byte[] { 0x1B, 0x47, 0x1 }; //activates bold


这篇关于C#-EPSON转义序列"n";价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆