示例#1
0
        // Convert Text To BarCode After Clicking the BarCode Button Ends

        // Convert Text To QRCode After Clicking the QRCode Button
        private void buttonQRCode_Click_1(object sender, EventArgs e)
        {
            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;

            pictureBoxQR.Image  = qrcode.Draw(textQRCode.Text, 50);
            MessageLabelQr.Text = "Done";
        }
示例#2
0
 private void btnGenerate_Click(object sender, EventArgs e)
 {
     Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
     if (lblFullLink.Text != "")
     {
         List <Image> list = controller.QRCodeGen(lblFullLink.Text, nudRow.Value, nudCol.Value);
         btnSave.Enabled = true;
         controller.DisplayPB(pbQRCode, pictureBox2, pictureBox3, pictureBox4, pictureBox5, pictureBox6, pictureBox7, pictureBox8, pictureBox9);
     }
     else
     {
         DialogResult dr = MessageBox.Show("Voulez vous vraiment générer le QRCode avec le lien sans paramètre ?", "Attention !", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
         if (dr == DialogResult.Yes)
         {
             pbQRCode.Image  = qrcode.Draw(tbxLink.Text, 50);
             btnSave.Enabled = true;
         }
         else
         {
             btnSave.Enabled = false;
         }
         if (pbQRCode.Image == null)
         {
             btnSave.Enabled = false;
         }
         else
         {
             btnSave.Enabled = true;
         }
     }
 }
        private void BttnGetItemNumber_Click(object sender, EventArgs e)
        {
            if (txtbxItemNumber.Text.Length < 1)
            {
                FrmLabelPrinter.ActiveForm.Size = new Size(655, 110);
                MessageBox.Show("Enter item number please.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            else if (txtbxSerialNumber.Text.Length >= 1 && txtbxItemNumber.Text.Length >= 1)
            {
                FrmLabelPrinter.ActiveForm.Size = new Size(685, 560);
                lblQRCode.Visible          = true;
                pctrbxSerialNumber.Visible = true;
                pctrbxQRCode.Visible       = true;
                bttnPrint.Visible          = true;
                Zen.Barcode.Code128BarcodeDraw barcode = Zen.Barcode.BarcodeDrawFactory.Code128WithChecksum;
                pctrbxSerialNumber.Image = barcode.Draw(txtbxSerialNumber.Text, 53);
                Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
                barcode = Zen.Barcode.BarcodeDrawFactory.Code128WithChecksum;
                pctrbxItemNumber.Image = barcode.Draw(txtbxItemNumber.Text, 53);
                pctrbxQRCode.Image     = qrcode.Draw(txtbxItemNumber.Text + "\n" + txtbxSerialNumber.Text, 5);
            }
            else
            {
                FrmLabelPrinter.ActiveForm.Size = new Size(670, 230);
                txtbxSerialNumber.Visible       = true;
                lblSerialNumber.Visible         = true;
                pctrbxItemNumber.Visible        = true;
                bttnGetSerialNumber.Visible     = true;
                Zen.Barcode.Code128BarcodeDraw barcode = Zen.Barcode.BarcodeDrawFactory.Code128WithChecksum;
                pctrbxItemNumber.Image = barcode.Draw(txtbxItemNumber.Text, 53);
            }
        }
示例#4
0
        private void button2_Click(object sender, EventArgs e)
        {
            string name    = "";
            string contact = "";

            con = new SqlConnection("Data Source=TAYYAB\\SQLEXPRESS;Initial Catalog=contacts;User ID=sa;Password=1234");
            con.Open();

            string        query  = "select * from condata where names = '" + textBox1.Text + "'";
            SqlCommand    cmd    = new SqlCommand(query, con);
            SqlDataReader reader = cmd.ExecuteReader();

            if (reader.Read())
            {
                name    = reader[1].ToString();
                contact = reader[2].ToString();
            }
            else
            {
                MessageBox.Show("Invalid name");
            }

            con.Close();
            reader.Close();

            string save = name + "\n" + contact;

            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            pictureBox1.Image = qrcode.Draw(save, 50);
        }
示例#5
0
 private void btnQr_Click(object sender, EventArgs e)
 {
     Zen.Barcode.CodeQrBarcodeDraw brcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
     lastQrText    = txtQr.Text;
     imgQr.Image   = brcode.Draw(txtQr.Text, 50);
     existNewImage = true;
 }
示例#6
0
        private void ButtonQRGen_Click(object sender, RoutedEventArgs e)
        {
            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;


            ImageQr.Source = metoda.ToWpfImage(qrcode.Draw(TextBoxLinkQR.Text, (50)));
        }
 private void generatebutton_Click(object sender, EventArgs e)
 {
     Zen.Barcode.CodeQrBarcodeDraw brcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
     lastQrText       = qrtext.Text;
     picturebox.Image = brcode.Draw(qrtext.Text, 50);
     existNewImage    = true;
 }
示例#8
0
 private void button3_Click(object sender, EventArgs e)
 {
     Zen.Barcode.CodeQrBarcodeDraw qrCode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
     pictureBox1.Image = qrCode.Draw(txtStudent.Text, 50);
     MessagingToolkit.QRCode.Codec.QRCodeDecoder d = new MessagingToolkit.QRCode.Codec.QRCodeDecoder();
     textBox1.Text = d.Decode(new QRCodeBitmapImage(pictureBox1.Image as Bitmap));
 }
示例#9
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            // *************** Zen BarCode ****************
            Zen.Barcode.BarcodeDraw brcode = Zen.Barcode.BarcodeDrawFactory.Code128WithChecksum;
            var barcodeImage = brcode.Draw(TextBox1.Text, 50);
            //barcodeImage.Save("D://brcodeweb.png");

            // ************ Draw Label For BarCode ****************

            var resultImage = new Bitmap(barcodeImage.Width, barcodeImage.Height + 20); // 20 is bottom padding, adjust to your text

            using (var graphics = Graphics.FromImage(resultImage))
                using (var font = new Font("Consolas", 12))
                    using (var brush = new SolidBrush(Color.Black))
                        using (var format = new StringFormat()
                        {
                            Alignment = StringAlignment.Center, // Also, horizontally centered text, as in your example of the expected output
                            LineAlignment = StringAlignment.Far
                        })
                        {
                            graphics.Clear(Color.White);
                            graphics.DrawImage(barcodeImage, 0, 0);
                            graphics.DrawString(TextBox1.Text, font, brush, resultImage.Width / 2, resultImage.Height, format);
                        }
            resultImage.Save("D://brcodeweb.png");

            //********* Zen QRCode **********

            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            var qrcodeImage = qrcode.Draw(TextBox1.Text, 5);

            qrcodeImage.Save("D://qrcodeweb.png");
        }
示例#10
0
 private void btnCodeBar_Click(object sender, EventArgs e)
 {
     Zen.Barcode.CodeQrBarcodeDraw codeQr = Zen.Barcode.BarcodeDrawFactory.CodeQr;
     pictureBox2.Image = codeQr.Draw(txtMatricule.Text, 25);
     //Zen.Barcode.Code128BarcodeDraw barcode = Zen.Barcode.BarcodeDrawFactory.Code128WithChecksum;
     //pictureBox2.Image = barcode.Draw(txtMatricule.Text, 50);
 }
示例#11
0
        private void Resi_Load(object sender, EventArgs e)
        {
            hitung hasil = new hitung();
            int    panjang, lebar, tinggi, berat;

            panjang = int.Parse(Form1.report_panjangbarang);
            lebar   = int.Parse(Form1.report_lebarbarang);
            tinggi  = int.Parse(Form1.report_tinggibarang);
            berat   = int.Parse(Form1.report_beratbarang);

            data_pengirim.Text    = Form1.report_namapengirim + ", " + Form1.report_nopengirim;
            data_penerima.Text    = Form1.report_namapenerima + ", " + Form1.report_nopenerima;
            alamat_penerima.Text  = Form1.report_kodepospenerima + ", " + Form1.report_kecamatanpenerima + ", " + Form1.report_kotapenerima + ", " + Form1.report_provinsipenerima + ", " + Form1.report_alamatpenerima;
            jenis_pengiriman.Text = hasil.kode(Form1.report_jenispengiriman);
            berat_barang.Text     = Form1.report_beratbarang + " KG";
            txt_deskripsi.Text    = Form1.report_desbarang + " " + Form1.report_is_pecahbelah;
            ongkir.Text           = (hasil.ongkir(panjang, lebar, tinggi, berat, Form1.report_kotapenerima)).ToString("C") + ",00";
            b_asuransi.Text       = (hasil.asuransi(Form1.report_jenispengiriman)).ToString("C") + ",00";
            total.Text            = ((hasil.ongkir(panjang, lebar, tinggi, berat, Form1.report_kotapenerima)) + (hasil.asuransi(Form1.report_jenispengiriman))).ToString("C") + ",00";

            Zen.Barcode.Code128BarcodeDraw Barcode = Zen.Barcode.BarcodeDrawFactory.Code128WithChecksum;
            barcode_img.Image = Barcode.Draw(resi_id.Text, 4000);

            Zen.Barcode.CodeQrBarcodeDraw Qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            qrcode_img.Image = Qrcode.Draw(resi_id.Text, 1);
        }
示例#12
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text != "")
            {
                Int32 unixTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(2019, 4, 11))).TotalSeconds;
                string save = "";
                save += textBox1.Text;

                
                try
                {
                    label6.Text = "Please Wait System is processing ....";
                    genqrcd myobj = new genqrcd(textBox1.Text);
                    Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
                    pictureBox1.Image = qrcode.Draw(save, 50);
                    label6.Text = "";
                }
                catch
                {
                    MessageBox.Show("check your internet connection");
                    label6.Text = "";
                }
            }
            else
            {
                label5.Text = "First generate unique pin";
            }
            

        }
示例#13
0
        private void crearCredencial(Persona persona)
        {
            using (PdfDocument document = new PdfDocument())
            {
                //Agrego una pagina al doc
                PdfPage page = document.Pages.Add();

                //Se generan los graficos para el PDF
                PdfGraphics graphics = page.Graphics;

                //Defino la fuente
                PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);

                //Escribo las credenciales
                graphics.DrawString("CREDENCIAL DE EMPLEADO", font, PdfBrushes.Black, new PointF(150, 5));
                graphics.DrawString(persona.Cuil.ToString(), font, PdfBrushes.Black, new PointF(150, 30));
                graphics.DrawString("Nombre: " + persona.Nombre, font, PdfBrushes.Black, new PointF(150, 55));
                graphics.DrawString("Apellido: " + persona.Apellido, font, PdfBrushes.Black, new PointF(150, 80));
                graphics.DrawString(persona.Cargo.Area.Nombre + " - " + persona.Cargo.Nombre, font, PdfBrushes.Black, new PointF(150, 105));

                //Genero y escribo el QR
                Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
                PdfBitmap image = new PdfBitmap(qrcode.Draw(persona.Cuil.ToString(), 60));
                graphics.DrawImage(image, 0, 0);

                //Guardo el PDF
                document.Save("C://SiADi-Credenciales/Credencial " + persona.Apellido + " " + persona.Nombre + ".pdf");
                MessageBox.Show("Credencial guardada en: \nC://SiADi-Credenciales/Credencial " + persona.Apellido + " " + persona.Nombre + ".pdf", "SiADi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
示例#14
0
        private void MobileSettings_TSMB_Click(object sender, EventArgs e)
        {
            try
            {
                Settings_MobileApp Dialog = new Settings_MobileApp();

                if (SystemArgs.MobileApplication.GetParametersConnect())
                {
                    String MyIP = Dns.GetHostByName(Dns.GetHostName()).AddressList[0].ToString();

                    Dialog.IP_TB.Text   = MyIP;
                    Dialog.Port_TB.Text = SystemArgs.MobileApplication.Port;

                    Zen.Barcode.CodeQrBarcodeDraw QrCode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
                    Dialog.QR_PB.Image = QrCode.Draw($"{MyIP}_{SystemArgs.MobileApplication.Port}_{SystemArgs.DataBase.Name}_{SystemArgs.DataBase.Owner}_{SystemArgs.DataBase.Password}_{SystemArgs.DataBase.IP}_{SystemArgs.DataBase.Port}", 100);
                }

                if (Dialog.ShowDialog() == DialogResult.OK)
                {
                }
            }
            catch (Exception E)
            {
                MessageBox.Show(E.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#15
0
        public string GenerarQR(string dni)
        {
            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            System.Drawing.Image          qr     = qrcode.Draw(dni, 50);

            qr.Save(dni);
            return(dni);
        }
示例#16
0
 private void btnQr_Click(object sender, EventArgs e)
 {
     textqr = cbxCat.SelectedValue + "-" + cbxType.SelectedValue + "-" + cbxValue.SelectedValue + "-" + cbxDiff.SelectedValue;
     Zen.Barcode.Code128BarcodeDraw barcode = Zen.Barcode.BarcodeDrawFactory.Code128WithChecksum;
     pictureBox3.Image = barcode.Draw(textqr, 50);
     Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
     pictureBox2.Image = qrcode.Draw(textqr, 50);
 }
示例#17
0
        private void generateCodes(string codeText)
        {
            Zen.Barcode.Code128BarcodeDraw barcode = Zen.Barcode.BarcodeDrawFactory.Code128WithChecksum;
            picBarCode.Image = barcode.Draw(codeText, 50);

            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            picQRCode.Image = qrcode.Draw(codeText, 50);
        }
示例#18
0
        private void button1_Click(object sender, EventArgs e)
        {
            int    guestId   = int.Parse(comboBox1.Text);
            var    guestName = (from x in db.Guest where x.GuestId == guestId select x.GuestName).FirstOrDefault();
            string test      = guestId.ToString() + " " + guestName;

            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            pictureBox1.Image = qrcode.Draw(test, 50);
        }
示例#19
0
        public PDF(string ticket, int tickNum)
        {
            place        = ticket;
            ticketNumber = tickNum + 1;
            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            Image imgQR = qrcode.Draw(ticket, 50);

            imgQR.Save(Paths.CODES_FOLDER + $"qr{ticketNumber}.png");
        }
示例#20
0
 private void btnQROlustur_Click(object sender, EventArgs e)
 {
     Zen.Barcode.CodeQrBarcodeDraw qrCode1 = Zen.Barcode.BarcodeDrawFactory.CodeQr;
     Zen.Barcode.CodeQrBarcodeDraw qrCode2 = Zen.Barcode.BarcodeDrawFactory.CodeQr;
     Zen.Barcode.CodeQrBarcodeDraw qrCode3 = Zen.Barcode.BarcodeDrawFactory.CodeQr;
     pictureBox1.Image = qrCode1.Draw("isim:" + txt1.Text + "soyisim" + txt2.Text + "firma:" + txt3.Text, 1000);
     pictureBox2.Image = qrCode2.Draw(txt2.Text, 100);
     pictureBox3.Image = qrCode3.Draw(txt3.Text, 100);
 }
示例#21
0
 public void rcept()
 {
     richTextBox1.Text += "************ZAB HOTEL***********\n";
     richTextBox1.Text += "Total Amount: " + totalAmt() + "\n\n\n";
     richTextBox1.Text += "Services: " + getServices() + "\n";
     richTextBox1.Text += "Date: " + date + "\n";
     Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
     pictureBox1.Image = qrcode.Draw("total amount: " + totalAmt().ToString(), 25);
 }
        public ReceiveEOT()
        {
            string address = Utilities.readTxtFile();

            InitializeComponent();
            addressLabel.Text = address;
            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            QRCodePictureBox.Image = qrcode.Draw(addressLabel.Text, 55);
        }
示例#23
0
        private void button2_Click(object sender, EventArgs e)
        {
            Zen.Barcode.CodeQrBarcodeDraw barcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            pictureBox2.Image = barcode.Draw(textBox1.Text, 50);
            this.name         = textBox1.Text;
            string image = Convert.ToBase64String(imageToByteArray(barcode.Draw(textBox1.Text, 50)));

            post(textBox1.Text, pictureBox2.Image);
        }
示例#24
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            Zen.Barcode.CodeQrBarcodeDraw qrCode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            pictureBox1.Image = qrCode.Draw(textBox1.Text + textBoxNameCustomer.Text + "PRIMAKOM", 50);

            Add();
            program1DataSet.product.AcceptChanges();
            Loop();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            pictureBox2.Image = qrcode.Draw(textBox7.Text, 100);
            MemoryStream ms = new MemoryStream();

            byte[] PhotoByte2 = null;
            pictureBox2.Image.Save(ms, ImageFormat.Jpeg);
            PhotoByte2 = ms.ToArray();
        }
示例#26
0
        public void rcept()
        {
            string date = DateTime.Now.ToString("dd-MM-yyyy");

            richTextBox1.Text += "************ZAB HOTEL***********\n";
            richTextBox1.Text += "Total Amount: " + totalAmt() + "\n\n\n";
            richTextBox1.Text += "Date: " + date + "\n";
            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            pictureBox1.Image = qrcode.Draw("total amount: " + totalAmt().ToString(), 25);
        }
示例#27
0
        public QRCode(Ticket ticket)
        {
            InitializeComponent();

            Zen.Barcode.CodeQrBarcodeDraw qrCode = Zen.Barcode.BarcodeDrawFactory.CodeQr;

            pictureBox1.Image = qrCode.Draw(ticket.ticketID.ToString(), 50);

            ticketID.Text = "TicketID = " + ticket.ticketID.ToString();
        }
示例#28
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            i++;
            wartosc        = gen.wyznacz(double.Parse(Generator1TextBoxOd.Text.ToString()), double.Parse(Generator1TextBoxDo.Text.ToString()));
            TextBox1.Text += "  " + i.ToString() + ")" + wartosc.ToString();

            Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;


            ImageQr.Source = metoda.ToWpfImage(qrcode.Draw(wartosc.ToString(), (50)));
        }
 private void button8_Click(object sender, EventArgs e)
 {
     if (textBarcode.Text == "")
     {
     }
     else
     {
         Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
         pictureBox3.Image = qrcode.Draw(textBarcode.Text, 50);
     }
 }
示例#30
0
文件: Form2.cs 项目: Jasiek23/RCP
        private void button1_Click(object sender, EventArgs e)
        {
            CardNumber randomCardNo = new CardNumber();

            textBox4.Text = randomCardNo.CardNumberRandom();
            Zen.Barcode.CodeQrBarcodeDraw userQRcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
            pictureBox1.Image = userQRcode.Draw(textBox4.Text, 200);

            AddUserButton.Enabled = true;
            button2.Enabled       = true;
        }