.NET??????????ThoughtWorks.QRCode??
???????????? ???????[ 2015/6/24 13:42:38 ] ???????????????
?????????
/// ????????
/// </summary>
/// <param name="strData">???????????????????????????磺 "4408810820 ?????????" ?????4444444444</param>
/// <param name="qrEncoding">?????磺BYTE ??ALPHA_NUMERIC??NUMERIC</param>
/// <param name="level">??С??L M Q H</param>
/// <param name="version">?汾???? 8</param>
/// <param name="scale">???????? 4</param>
/// <returns></returns>
public ActionResult CreateCode_Choose(string strData?? string qrEncoding?? string level?? int version?? int scale)
{
QRCodeEncoder qrCodeEncoder = new QRCodeEncoder();
string encoding = qrEncoding;
switch (encoding)
{
case "Byte":
qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE;
break;
case "AlphaNumeric":
qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.ALPHA_NUMERIC;
break;
case "Numeric":
qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.NUMERIC;
break;
default:
qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE;
break;
}
qrCodeEncoder.QRCodeScale = scale;
qrCodeEncoder.QRCodeVersion = version;
switch (level)
{
case "L":
qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.L;
break;
case "M":
qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M;
break;
case "Q":
qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.Q;
break;
default:
qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.H;
break;
}
//??????????
Image image = qrCodeEncoder.Encode(strData);
string filename = DateTime.Now.ToString("yyyymmddhhmmssfff").ToString() + ".jpg";
string filepath = Server.MapPath(@"~Upload") + "\" + filename;
//???????в??????????
//if (!Directory.Exists(filepath))
// Directory.CreateDirectory(filepath);
System.IO.FileStream fs = new System.IO.FileStream(filepath?? System.IO.FileMode.OpenOrCreate?? System.IO.FileAccess.Write);
image.Save(fs?? System.Drawing.Imaging.ImageFormat.Jpeg);
fs.Close();
image.Dispose();
return Content(@"/Upload/" + filename);
}
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
?????????????????(java .net ?????).Net?й???????????Asp.net MVC??ζ???????????????????????Trim????Asp.Net WebForm????????????.Net??????????С????asp.net ???????????.Net??????????????????Linux???Jexus?й?Asp.Net Core??ó???asp.net??????????????ASP.NET???????JSON?????????????????? .NET ?? Java ???? IT ???.Net??Ч???????????????ù???ASP.NET MVC???????????Щ?£?.NET???????????????????????.net???????????????Asp.net Core MVC?????Session
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????