weat!!

二轮冲刺第三天

冲刺第三天,

我们的任务是

我负责代码的编写

崔的任务是运行调试


        private void button3_Click(object sender, EventArgs e)
        {
            //设置QR二维码的规格
            ZXing.QrCode.QrCodeEncodingOptions qrEncodeOption = new ZXing.QrCode.QrCodeEncodingOptions();
            //设置编码格式,否则中文乱码
            qrEncodeOption.CharacterSet = "UTF-8";
            //设置宽和高
            qrEncodeOption.Height = 200;
            qrEncodeOption.Width = 200;
            //设置周围空白边距
            qrEncodeOption.Margin = 1;
            ZXing.BarcodeWriter wr = new BarcodeWriter();
            //二维码
            wr.Format = BarcodeFormat.QR_CODE;
            wr.Options = qrEncodeOption;
            //生成二维码
            Bitmap image = wr.Write(textBox4.Text);
            //显示
            pictureBox3.Image = image;
        }
        //生成二维码-保存
        private void button7_Click(object sender, EventArgs e)
        {
            //保存图片
            saveImage(pictureBox3, textBox4.Text);
        }
        //读取二维码-选择图片
        private void button5_Click(object sender, EventArgs e)
        {
            //打开图片
            openImage(textBox6, pictureBox4);
        }

今日任务完成

posted on 2018-12-07 21:55  weat!!  阅读(82)  评论(0编辑  收藏  举报

导航