public frmCardByProduct()
        {
            InitializeComponent();
            //if (txtProductID.Text.Trim() != "")
            //Grid.Focus();

            oCardTemplate = new CardTemplate();
        }
        private void frmOrder_Load(object sender, System.EventArgs e)
        {
            oCardTemplate = new CardTemplate();

            this.Text += " - " + this.CompanyID;

            tStrip.Renderer = new WindowsVistaRenderer();
        }
        private void frmOrder_Load(object sender, System.EventArgs e)
        {
            oProduct      = new Product(CompanyID);
            oCard         = new Signature.Classes.Card(CompanyID);
            oCardTemplate = new CardTemplate();

            this.Text += " - " + this.CompanyID;

            tStrip.Renderer = new WindowsVistaRenderer();
        }
Exemplo n.º 4
0
        public Boolean Print(Boolean isTest)
        {
            Boolean _Printed = false;

            //CardPrinterPrinterSettings.PrinterName = "IS700C";
            //CardPrinter.PrinterSettings.PrinterName = "RISO RZ 9 Series";
            // CardPrinter.PrinterSettings.PrinterName = "RICOH HQ9000 RPCS";
            //CardPrinter.PrinterSettings.PrinterName = "RISO RN2550(ADVANCE)";
            //CardPrinter.PrinterSettings.PrinterName = "Send To OneNote 2007";
            if (this.Lines.Count > 0)
            {
                String PrinterName = Global.OpenPrintDialog();
                if (PrinterName != "")
                {
                    CardTemplate oCardTemplate = new CardTemplate();
                    Card         oCard         = new Card(this.CompanyID);
                    oCard.Find(this.ProductID);
                    if (!oCardTemplate.Find(oCard.CardTemplateID))
                    {
                        MessageBox.Show("No template found: " + oCard.CardTemplateID.ToString());
                        return(false);
                    }

                    CardPrinter CardPrinter = new CardPrinter();

                    CardPrinter.PrinterSettings.PrinterName = PrinterName;

                    CardPrinter.Clear();
                    foreach (Line oLine in this.Lines)
                    {
                        CardPrinter.Add(oLine.Text);
                    }

                    if (oCard.AsTemplate)
                    {
                        CardPrinter.Point = oCardTemplate.Point;
                    }
                    else
                    {
                        CardPrinter.Point = new PointF((float)(oCard.PointX * 100), (float)(oCard.PointY * 100));
                    }

                    CardPrinter.PaperSize = oCardTemplate.PaperSize;
                    CardPrinter.Copies    = 24;
                    CardPrinter.UpperCase = false;

                    CardPrinter.Rotation = (short)oCardTemplate.Rotation;
                    CardPrinter.TestMode = false;

                    if (this.PictureFileName != "")
                    {
                        CardPrinter.PrintType = CardPrintType.Image;
                        CardPrinter.FileName  = Global.ImageDirectory + this.PictureFileName;
                    }
                    CardPrinter.Font = new Font(oCardTemplate.FontName, oCardTemplate.FontSize, oCardTemplate.Bold ? FontStyle.Bold : FontStyle.Regular);
                    //  CardPrinter.Settings();
                    CardPrinter.Print();
                    _Printed = true;
                }
            }
            return(_Printed);
        }