private void btn_generateqrcode_Click(object sender, EventArgs e) { if (txtbox_text.Text == "") { MessageBox.Show("文本框不能为空!"); txtbox_text.Focus(); } else { //picturebox_qrcode.Image = ZxingCode.GenerateBarcode(txtbox_text.Text, 300, 300); picturebox_qrcode.Image = ZxingCode.GenerateQRCode(txtbox_text.Text, 300, 300); //picturebox_qrcode.Image = ZxingCode.GenerateQRCodeWithLOGO(txtbox_text.Text, 300, 300); } }
private void 扫描屏幕二维码ToolStripMenuItem_Click(object sender, EventArgs e) { Tuple <bool, string> tup = ZxingCode.ScanScreenQRCode(); if (tup.Item1 == true) { txtbox_text.Text = tup.Item2; picturebox_qrcode.Image = ZxingCode.GenerateQRCode(tup.Item2, 300, 300); this.Show(); this.WindowState = System.Windows.Forms.FormWindowState.Normal; } else { MessageBox.Show(tup.Item2); } }
private void btn_scanscreenqrcode_Click(object sender, EventArgs e) { Reset(); Tuple <bool, string> tup = ZxingCode.ScanScreenQRCode(); if (tup.Item1 == true) { txtbox_text.Text = tup.Item2; picturebox_qrcode.Image = ZxingCode.GenerateQRCode(tup.Item2, 300, 300); } else { MessageBox.Show(tup.Item2); } }