2016-03-18 52 views
1

我使用EPSONTMT82打印机打印字符串。在那个字符串中,我必须使令牌不为粗体。我加入<b> <b/>但它不打印在大胆的印花令牌没有像如何在爱普生TMT82打印机上打印wpf中字符串粗体的某些部分

Your token no is <b>C027-</b> 
Approximate Wait Time 90.00 Min 

我想打印标记没有像C027

这是我的代码

if (lst[i].DisplayName.ToLower().Contains("token no")) 
{ 
if (lst[i].DisplayName == lst[i].StaticValue) 
strPrint += lst[i].StaticValue + constBold; 
else 
strPrint += lst[i].DisplayName + " " + "<b>" + lst[i].StaticValue + "<b/>"; 
} 

我怎么能做这个任何建议。

回答

1

https://stackoverflow.com/a/20267631/6034701

貌似这已经在这里已经回答了。

的解决方案是:

var result = Regex.Replace(
"The allergy type a1c should be written A1C.", // input 
@"a1c",          // word to match 
@"<b>$0</b>",         // "wrap match in bold tags" 
RegexOptions.IgnoreCase);      // ignore case when matching 
+0

我想,一个没有用的。 – surendra

+0

结果:过敏类型a1c应写入A1C surendra

相关问题