您当前的位置: 首页 >  c#

刘一哥GIS

暂无认证

  • 5浏览

    0关注

    934博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

C#生成二维码(含解码)

刘一哥GIS 发布时间:2014-12-01 22:04:12 ,浏览量:5

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
关注
打赏
1665586602
查看更多评论
立即登录/注册

微信扫码登录

2.1989s