Ejemplo n.º 1
0
        private void PrintCommon(Graphics g, int yOffset, bool onlyUpper, FormType formType)
        {
            Font defaultTextFont = new Font("Courier New", 9, FontStyle.Bold);

            printStamp(g, 130, 11);
            //Font stampFont = new Font("Courier New", 7, FontStyle.Bold);

            //string[] Stamp = Settings.Settings.SettingsHolder.Stamp;
            //for (int i = 0; i < Math.Min(6, Stamp.Length); i++)
            //{
            //    g.DrawString(Stamp[i], stampFont, TextBrush, new PointF(130, 11+((6-Math.Min(Stamp.Length,6))/(float)2+i)*11), CenterTopAlign);
            //}

            g.DrawString("číslo " + m_recToPrint.TypeID.ToString() + m_recToPrint.NoteToNumber, defaultTextFont, TextBrush, new Point(260, 45), LeftTopAlign);
            g.DrawString("ze dne " + m_recToPrint.Date, defaultTextFont, TextBrush, new Point(260, 60), LeftTopAlign);

            if (formType == FormType.Income)
            {
                g.DrawString("Přijato od: " + m_recToPrint.CustName, defaultTextFont, TextBrush, new Point(10, 88), LeftTopAlign);
            }
            else
            {
                g.DrawString("Vyplaceno: " + m_recToPrint.CustName, defaultTextFont, TextBrush, new Point(10, 88), LeftTopAlign);
            }
            g.DrawString("Částka: " + MoneyConvertor.MoneyToStr(m_recToPrint.Cost) + ",00 Kč", new Font("Courier New", 11, FontStyle.Bold),
                         TextBrush, new Point(10, 105), LeftTopAlign);

            string castkaSlovy = "Slovy: " + "=" + NumberConvertor.ConvertIntToWord((int)m_recToPrint.Cost) + " Kč=";

            g.DrawString(castkaSlovy, defaultTextFont, TextBrush, new Point(10, 125), LeftTopAlign);
            g.DrawString("Účel platby: " + m_recToPrint.Content, defaultTextFont, TextBrush, new Point(10, 142), LeftTopAlign);

            if (!onlyUpper)
            {
                g.DrawString("Text", defaultTextFont, TextBrush, new Point(70, 224), CenterCenterAlign);
                g.DrawString("Účt. předpis (Má dáti-účet)", defaultTextFont, TextBrush, new Point(255, 224), CenterCenterAlign);
                g.DrawString("Kč", defaultTextFont, TextBrush, new Point(437, 224), CenterCenterAlign);

                g.DrawString("Schválil:", defaultTextFont, TextBrush, new Point(10, 317), LeftCenterAlign);
                g.DrawString("Zaúčtoval:", defaultTextFont, TextBrush, new Point(195, 317), LeftCenterAlign);
                g.DrawString("Dne: ", defaultTextFont, TextBrush, new Point(383, 317), LeftCenterAlign);
            }

            g.DrawString(footerText, m_footerFont, TextBrush, 500, 325, RightTopAlign);
        }
Ejemplo n.º 2
0
 private void numericUpDown1_ValueChanged(object sender, EventArgs e)
 {
     this.label1.Text = NumberConvertor.ConvertIntToWord(decimal.ToInt32(this.numericUpDown1.Value));
 }