using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;using System.Collections;
using com.google.zxing;//需要从网上下载
using System.Text.RegularExpressions;
using ByteMatrix = com.google.zxing.common.ByteMatrix;namespace 二维码
{public partial class Form1 : Form{public Form1(){InitializeComponent();}//生成条形码private void button1_Click(object sender, EventArgs e){Regex rg = new Regex("^[0-9]{13}$");if (!rg.IsMatch(textBox1.Text)){MessageBox.Show("本例子采用EAN_13编码,需要输入13位数字");return;}try{MultiFormatWriter mutiWriter = new com.google.zxing.MultiFormatWriter();ByteMatrix bm = muti