View difference between Paste ID: 7wsUidCj and i3v9Cx1F
SHOW: | | - or go back to the newest paste.
1-
class MyBarcode: :AxIDAutomation.AxBarCode
1+
class MyBarcode : AxIDAutomation.AxBarCode
2
//...
3
public Image PictureAll
4-
get
4+
5
	get
6-
Image img;
6+
	{
7-
img = this.Picture;
7+
		Image img;
8-
Bitmap barcode = new Bitmap(this.Picture);
8+
		img = this.Picture;
9-
Graphics g = Graphics.FromImage(barcode);
9+
		Bitmap barcode = new Bitmap(this.Picture);
10-
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
10+
		Graphics g = Graphics.FromImage(barcode);
11-
System.Drawing.SolidBrush myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);
11+
		g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
12-
Font font = new Font("Arial",10);
12+
		System.Drawing.SolidBrush myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);
13-
Pen pen = new Pen(myBrush);
13+
		Font font = new Font("Arial",10);
14-
myBrush.Color = Color.White;
14+
		Pen pen = new Pen(myBrush);
15-
Rectangle rectangle = new Rectangle(0, 0, Picture.Width, 20);
15+
		myBrush.Color = Color.White;
16-
g.FillRectangle(myBrush,rectangle );
16+
		Rectangle rectangle = new Rectangle(0, 0, Picture.Width, 20);
17-
myBrush = new SolidBrush(Color.Black);
17+
		g.FillRectangle(myBrush,rectangle );
18-
StringFormat format = new StringFormat();
18+
		myBrush = new SolidBrush(Color.Black);
19-
format.Alignment=StringAlignment.Center;
19+
		StringFormat format = new StringFormat();
20-
g.DrawString("Department-Iteam",font,myBrush,(RectangleF)rectangle,format);
20+
		format.Alignment=StringAlignment.Center;
21-
g.Flush();
21+
		g.DrawString("Department-Iteam",font,myBrush,(RectangleF)rectangle,format);
22-
myBrush.Dispose();
22+
		g.Flush();
23-
pen.Dispose();
23+
		myBrush.Dispose();
24-
g.Dispose();
24+
		pen.Dispose();
25-
return barcode;
25+
		g.Dispose();
26-
}
26+
		return barcode;
27
	}
28
}