Ejemplo n.º 1
0
    private void DrawFooter()
    {
        OrderTotal ordTot = new OrderTotal('?');

        foreach (string l in footer)
        {
            line = ordTot.GetTotalCantidad(l);
            line = AlignRightText(line.Length) + line;

            gfx.DrawString(line, printFont, Brushes.Black, leftMargin, YPosition(), new StringFormat());
            leftMargin = 0;

            line = "" + ordTot.GetTotalName(l);
            gfx.DrawString(line, printFont, Brushes.Black, leftMargin, YPosition(), new StringFormat());
            count++;
        }
        leftMargin = 0;
        DrawEspacio();


        line = DottedLine();

        gfx.DrawString(line, printFont, Brushes.Black, leftMargin, YPosition(), new StringFormat());

        count++;
        DrawEspacio();
    }
Ejemplo n.º 2
0
        private void DrawTotales()
        {
            OrderTotal orderTotal = new OrderTotal('?');

            foreach (string totale in this.totales)
            {
                this.line = orderTotal.GetTotalCantidad(totale);
                this.line = this.AlignRightText(this.line.Length) + this.line;
                this.gfx.DrawString(this.line, this.printFont, (Brush)this.myBrush, this.leftMargin, this.YPosition(), new StringFormat());
                this.leftMargin = 0.0f;
                this.line       = "      " + orderTotal.GetTotalName(totale);
                this.gfx.DrawString(this.line, this.printFont, (Brush)this.myBrush, this.leftMargin, this.YPosition(), new StringFormat());
                ++this.count;
            }
            this.leftMargin = 0.0f;
            //this.DrawEspacio();
            //this.DrawEspacio();
        }
Ejemplo n.º 3
0
    private void DrawDatos()
    {
        OrderTotal ordTot = new OrderTotal('?');

        foreach (string dato in datos)
        {
            if (dato.Length > maxChar)
            {
                int    currentChar  = 0;
                int    headerLenght = dato.Length;
                string aa           = ordTot.GetTotalCantidad(dato);
                string bb           = "     " + ordTot.GetTotalName(dato);
                string cc;
                if (bb != "")
                {
                    cc = aa + bb;
                }
                else
                {
                    cc = "       " + aa + bb;
                }
                while (headerLenght > maxChar)
                {
                    line = cc.Substring(currentChar, maxChar);
                    line = AlignRightText(line.Length) + line;

                    gfx.DrawString(line, printFont, Brushes.Black, leftMargin, YPosition(), new StringFormat());
                    leftMargin = 0;


                    count++;

                    currentChar  += maxChar;
                    headerLenght -= maxChar;
                }
                line = cc;
                gfx.DrawString(line.Substring(currentChar, line.Length - currentChar), printFont, Brushes.Black, leftMargin, YPosition(), new StringFormat());
                count++;
            }
            else
            {
                string aa = ordTot.GetTotalCantidad(dato);
                string bb = ordTot.GetTotalName(dato);
                string cc;
                if (bb != "")
                {
                    cc = aa + bb;
                }
                else
                {
                    cc = "       " + aa + bb;
                }
                line = cc;
                gfx.DrawString(line, printFont, Brushes.Black, leftMargin, YPosition(), new StringFormat());

                count++;
            }
        }
        leftMargin = 0;
        DrawEspacio();


        line = DottedLine();

        gfx.DrawString(line, printFont, Brushes.Black, leftMargin, YPosition(), new StringFormat());

        count++;
        DrawEspacio();
    }
Ejemplo n.º 4
0
            private void DrawTotales()
            {
                OrderTotal ordTot = new OrderTotal('?');

                foreach (string total in totales)
                {
                    line = ordTot.GetTotalCantidad(total);
                    line = AlignRightText(line.Length) + line;

                    gfx.DrawString(line, printFont, myBrush, leftMargin, YPosition(), new StringFormat());
                    leftMargin = 0;

                    line = "      " + ordTot.GetTotalName(total);
                    gfx.DrawString(line, printFont, myBrush, leftMargin, YPosition(), new StringFormat());
                    count++;
                }
                leftMargin = 0;
                DrawEspacio();
                DrawEspacio();
            }