Home > Software engineering >  Some problems about Barcode
Some problems about Barcode

Time:10-11

Public void testControl1_Paint (object sender, PaintEventArgs e)
{
Int x=10;

SizeF hSize=um participant raphics. MeasureString (str1 InfoFont);
SizeF fSize=um participant raphics. MeasureString (str1 footerFont);

Int headerX=0;
Int footerX=0;
If (the align==AlignType. Left)
{
X=leftMargin;
HeaderX=leftMargin;
FooterX=leftMargin;
}
Else if (the align==AlignType. Center)
{

HSize headerX=(Width - (int). The Width)/2;
FooterX=(Width - (int) fSize. Width)/2;
}
The else
{
X=Width - leftMargin;
HSize headerX=Width - (int). The Width - leftMargin;
FooterX=Width - (int) fSize. Width - leftMargin;
}

Um participant raphics. DrawString (+ "*", "*" + str1 barcodeFont, Brushes, Black, leftMargin, topMargin);
Um participant raphics. FillRectangle (Brushes. White, 0, topMargin + height, 200, height);
Um participant raphics. DrawString (str1 footerFont, Brushes, Black, footerX, topMargin + height + 3);

Um participant raphics. DrawString (+ "*", "*" + str2 barcodeFont, Brushes, Black, leftMargin, topMargin + 100);
Um participant raphics. FillRectangle (Brushes. White, 0, topMargin + height + 100, 200, height);
Um participant raphics. DrawString (str2 footerFont, Brushes, Black, footerX, topMargin + height + 3 + 100);

About this code, is I imitate the process of writing an input string output of bar code, in the middle of the statement, and the principle of the following is not very understanding, hope that they can help me a little analytical predecessors, here we need to pay attention to and why to write, just graduated, just contact with this sort of thing, so,,, the trouble thank you
Design is Desmond tutu two TBX output barcode

In some places there are still problems of the code

CodePudding user response:

Well, well, I'm not particularly clear, after all, is a series of bar code, a little complicated, but you can see some online about barcode example
  • Related