Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }