标签:creat tor com send tar 生成二维码 fir 16px string
在BS架构下,通过后台生成二维码
1.引用类库,ThoughtWorks.QRCode.dll密码:1024。
2.代码:
string msg = "00000000001980";
Bitmap bt;
string enCodeString = DateTime.Now.ToString();
QRCodeEncoder qrCodeEncoder = new QRCodeEncoder();
bt = qrCodeEncoder.Encode(enCodeString, Encoding.UTF8);
string filename = msg + ".jpg";
filename = filename.Replace(" ", "");
filename = filename.Replace(":", "");
filename = filename.Replace("-", "");
//filename = filename.Replace(".", "");
if (!Directory.Exists(@"C:\二维码\"))
{
Directory.CreateDirectory(@"C:\二维码\");
}
filename = @"C:\二维码\" + filename;
bt.Save(filename, ImageFormat.Png);
标签:creat tor com send tar 生成二维码 fir 16px string
原文地址:https://www.cnblogs.com/zhangjie6/p/10337178.html