Default.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Drawing.Imaging;
using System.Text;
using System.Drawing.Drawing2D;
using com.google.zxing;
using com.google.zxing.qrcode;
using com.google.zxing.datamatrix;
using com.google.zxing.pdf417;
using com.google.zxing.multi.qrcode;
using com.google.zxing.common;
using com.google.zxing.qrcode.detector;
using System.IO;
//下载于51aspx.com
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
//构造二维码写码器
MultiFormatWriter mutiWriter = new com.google.zxing.MultiFormatWriter();
Hashtable hint = new Hashtable();
hint.Add(EncodeHintType.CHARACTER_SET, "UTF-8");
hint.Add(EncodeHintType.ERROR_CORRECTION, com.google.zxing.qrcode.decoder.ErrorCorrectionLevel.H);
//生成二维码
ByteMatrix bm = mutiWriter.encode(textBox1.Text, com.google.zxing.BarcodeFormat.QR_CODE, 300, 300, hint);
Bitmap img = bm.ToBitmap();
// pictureBox1.Image = img;
//自动保存图片到当前目录
string filename = Server.MapPath(Request.ApplicationPath);
string filename2="QR" + DateTime.Now.Ticks.ToString() + ".jpg";
img.Save(filename+"\\"+filename2, System.Drawing.Imaging.ImageFormat.Jpeg);
Image2.ImageUrl = filename2;
后面还有 43 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。