コード例 #1
0
 private void QrCode(int size, string text)
 {
     try
     {
         ShowError(false, null);
         if (pictureBox1.Image != null)
         {
             pictureBox1.Image.Dispose();
             pictureBox1.Image = null;
         }
         if (IsOnline) // 在线生成二维码
         {
             pictureBox1.Image = LocalQRCode.OnlineGenerateQRCode(size, _Content);
         }
         else          // 本地生成二维码
         {
             pictureBox1.Image = LocalQRCode.LocalGenerateQRCode(size, _Content);
         }
     }
     catch (Exception ex)
     {
         ShowError(true, ex.Message);
     }
 }
コード例 #2
0
 private Bitmap CreateQrCode(int size, string text) => LocalQRCode.LocalGenerateQRCode(size, text);