public recieve_bitcoin(string A) { InitializeComponent(); //ICryptocoinService bitcoinService = new CryptocoinService("http://162.213.252.66:18332/", "test", "test123", "qwe"); ICryptocoinService bitcoinService = new CryptocoinService("http://198.54.119.56:36345//", "bitcoinrpc", "GrvHKju9oLg6Kw", "qwe"); string a = bitcoinService.GetNewAddress(A); address_textBox.Text = a; pictureBox.Location = new Point(75, 30); Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr; pictureBox.Image = qrcode.Draw(a, 50); }
// /// <summary> /// GERAR QR CODE /// </summary> private void geraQrCode() { //PEGA INFORMAÇÕES var clienteF = lblCliente.Text; //var fP = "Faturado para: " + clienteF; //var infoFat = "\nID da Fatura: " + txtIDFat.Text + "\nTotal: " + txtTotal.Text; //var infoQr = infoFat + "\n\nObrigado!"; //var site = "\nwww.marcelomotta.com"; //var desc = fP + infoQr + site; var texto = "Faturado para: " + clienteF + "\nID da Fatura: " + txtIDFat.Text + "\nTotal: " + txtTotal.Text + "\n\nObrigado!" + "\nwww.marcelomotta.com"; Zen.Barcode.CodeQrBarcodeDraw qr = Zen.Barcode.BarcodeDrawFactory.CodeQr; imgQr.Image = qr.Draw(texto, 50); //imgQr.Image qr.Draw(texto.Text, 50); }
void ExportDataTableToPdf(DataTable dtblTable, String strPdfPath, string strHeader, string strNumber, string strStaffID, decimal subtotal, decimal tax, decimal total, decimal discount, decimal change) { System.IO.FileStream fs = new FileStream(strPdfPath, FileMode.Create, FileAccess.Write, FileShare.None); Document document = new Document(); document.SetPageSize(iTextSharp.text.PageSize.A4); PdfWriter writer = PdfWriter.GetInstance(document, fs); document.Open(); //Report Header BaseFont bfnt = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); Font fntHead = new Font(bfnt, 14, 1, Color.GRAY); Font fntHotLine = new Font(bfnt, 10, 1, Color.GRAY); Font fntStaff = new Font(bfnt, 8, 2, Color.GRAY); Paragraph prgHeading = new Paragraph(); prgHeading.Alignment = Element.ALIGN_LEFT; prgHeading.Add(new Chunk(strHeader.ToUpper(), fntHead)); prgHeading.Add(new Chunk(" Hotline: " + strNumber.ToUpper(), fntHotLine)); prgHeading.Add(new Chunk("\nHouse# 12, Road# 5, Block# D\nBanashree, Rampura, Dhaka-1219\nBangladesh", fntHotLine)); prgHeading.Add(new Chunk("\nStaff ID: " + strStaffID, fntStaff)); prgHeading.Add(new Chunk("\nOrder Date : " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString(), fntStaff)); document.Add(prgHeading); //line seperation Paragraph p = new Paragraph(new Chunk(new iTextSharp.text.pdf.draw.LineSeparator(0.0F, 100.0F, Color.BLACK, Element.ALIGN_LEFT, 1))); document.Add(p); //line break document.Add(new Chunk("\n", fntHead)); document.Add(new Chunk("Ordered Items: \n\n", new Font(bfnt, 12, 0, Color.BLACK))); //the table PdfPTable table = new PdfPTable(dtblTable.Columns.Count); //Table header Font fntColumnHeader = new Font(bfnt, 8, 0, Color.BLACK); Font fntCell = new Font(bfnt, 8, 0, Color.BLACK); for (int i = 0; i < dtblTable.Columns.Count; i++) { PdfPCell cell = new PdfPCell(); cell.BackgroundColor = Color.LIGHT_GRAY; cell.AddElement(new Chunk(dtblTable.Columns[i].ColumnName.ToUpper(), fntColumnHeader)); table.AddCell(cell); } //table Data for (int i = 0; i < dtblTable.Rows.Count; i++) { for (int j = 0; j < dtblTable.Columns.Count; j++) { table.AddCell(new PdfPCell(new Phrase(dtblTable.Rows[i][j].ToString(), fntCell))); } } document.Add(table); Font fntFinal = new Font(bfnt, 10, 0, Color.BLACK); Paragraph prgFinal = new Paragraph(); prgFinal.Alignment = Element.ALIGN_LEFT; prgFinal.Add(new Chunk("\n\n SubTotal: " + subtotal + " Taka", fntFinal)); prgFinal.Add(new Chunk("\n Tax: " + tax + " Taka", fntFinal)); prgFinal.Add(new Chunk("\n Discount: " + discount + " Taka", fntFinal)); document.Add(prgFinal); prgFinal.Clear(); Paragraph pa = new Paragraph(new Chunk(new iTextSharp.text.pdf.draw.LineSeparator(0.0F, 50.0F, Color.BLACK, Element.ALIGN_RIGHT, 1))); document.Add(pa); prgFinal.Add(new Chunk("\n Cash: " + (total + change) + " Taka", fntFinal)); prgFinal.Add(new Chunk("\n Total: " + total + " Taka", fntFinal)); prgFinal.Add(new Chunk("\n Change: " + change + " Taka", fntFinal)); document.Add(prgFinal); string s = null; foreach (DataRow dr in dtblTable.Rows) { s = s + " " + dr["Name"] + " " + dr["Quantity"]; } System.Drawing.Image imgZenBarcode; iTextSharp.text.Image imgQRCode; Zen.Barcode.CodeQrBarcodeDraw qrCode = Zen.Barcode.BarcodeDrawFactory.CodeQr; imgZenBarcode = qrCode.Draw(s, 50); imgQRCode = iTextSharp.text.Image.GetInstance(imgZenBarcode, System.Drawing.Imaging.ImageFormat.Png); imgQRCode.Alignment = Element.ALIGN_BOTTOM; imgQRCode.ScaleToFit(50f, 50f); document.Add(imgQRCode); document.Close(); writer.Close(); fs.Close(); }
public void QRcode(PictureBox picture) { Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr; picture.Image = qrcode.Draw(codeGen(), 2); }
private void btnCodeBar_Click(object sender, EventArgs e) { Zen.Barcode.CodeQrBarcodeDraw codeQr = Zen.Barcode.BarcodeDrawFactory.CodeQr; pictureBox2.Image = codeQr.Draw(txtRegisterNumber.Text, 25); }