Commit dcbe0719 authored by 李佳's avatar 李佳

比分玩法胜平负其它选项乱码问题

parent 78f09699
...@@ -23,11 +23,12 @@ namespace ChuPiao.AutoPrint.Machine.Models ...@@ -23,11 +23,12 @@ namespace ChuPiao.AutoPrint.Machine.Models
//湖北元字有乱码 //湖北元字有乱码
_captureDataString = _captureDataString.Replace(@"灶\?@\?", "元").Replace("灶?@?", "元"); _captureDataString = _captureDataString.Replace(@"灶\?@\?", "元").Replace("灶?@?", "元");
//广西“其它”有乱码 (3:3)@60.00元+(平祁?@渌?@175.0元+(2:4)@60 (负祁?渌?)@50.00元 (平祁?@渌?)@ //放到比分玩法里面去替换了
Regex re = new Regex(@"祁.*?渌.*?@"); ////广西“其它”有乱码 (3:3)@60.00元+(平祁?@渌?@175.0元+(2:4)@60 (负祁?渌?)@50.00元 (平祁?@渌?)@
_captureDataString = re.Replace(_captureDataString, "其它)@"); //Regex re = new Regex(@"祁.*?渌.*?@");
//_captureDataString = re.Replace(_captureDataString, "其它)@");
//_captureDataString = _captureDataString.Replace(@"祁?@渌?", "其它)").Replace(@"祁?渌?", "其它"); //_captureDataString = _captureDataString.Replace(@"祟?@?", "它"); //(平其祟?@?)@150.0元
} }
private byte[] _captureDataBytes; private byte[] _captureDataBytes;
......
...@@ -246,6 +246,20 @@ namespace ChuPiao.AutoPrint.Machine.TjJingCaiV1.MacLotPlayMode ...@@ -246,6 +246,20 @@ namespace ChuPiao.AutoPrint.Machine.TjJingCaiV1.MacLotPlayMode
/// <returns></returns> /// <returns></returns>
private string DealRateCode(string Istr) private string DealRateCode(string Istr)
{ {
//(平祁?@渌?@175.0元
//(负祁?渌?)@50.00元
//(平祁?@渌?)@50.00元
//(平其祟?@?)@150.0元
Regex re = new Regex(@"[胜平负](\D{1,})@\d{1,}.\d{1,}元");
MatchCollection mc = re.Matches(Istr);
foreach (Match ma in mc)
{
if (ma.Groups[1].Value != "其它)")
{
Istr = Istr.Replace(ma.Groups[1].Value, "其它)");
}
}
Istr = Regex.Replace(Istr, @"[^():胜平负其它元@.+\d]{1}", ""); Istr = Regex.Replace(Istr, @"[^():胜平负其它元@.+\d]{1}", "");
string tmpstr = ""; string tmpstr = "";
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment