Пример #1
0
        private void btn_print_Click(object sender, EventArgs e)
        {
            List <Badge> newBadges = new List <Badge>();
            BadgeCreator bc        = null;
            bool         openPDF   = false;

            txt_name.Text      = "Név";
            txt_name.ForeColor = Color.Gray;
            txt_pos.Text       = "Poszt";
            txt_pos.ForeColor  = Color.Gray;


            for (int cnt = 0; cnt < lst_newBadges.Items.Count; cnt++)
            {
                Badge badge = new Badge();
                badge.Name = lst_newBadges.Items[cnt].SubItems[0].Text;
                badge.Pos  = lst_newBadges.Items[cnt].SubItems[1].Text;
                newBadges.Add(badge);
            }

            if (this.cb_openPDF_singleBadge.CheckState == CheckState.Checked)
            {
                openPDF = true;
            }

            bc = new BadgeCreator(this, newBadges, openPDF);
            bc.StartGenerate();
        }
Пример #2
0
        private void btn_generate_Click(object sender, EventArgs e)
        {
            bool openPDF = false;

            if (this.cb_openPDF_fromXLS.CheckState == CheckState.Checked)
            {
                openPDF = true;
            }

            BadgeCreator bc = new BadgeCreator(this, this.XLS_location.Text, this.txt_pdfPath.Text, this.logo_Location.Text, openPDF);

            bc.StartGenerate();
        }