/
Form1.cs
41 lines (35 loc) · 1.5 KB
/
Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using DevExpress.XtraPrinting;
using MyBrick;
namespace CustomBricks {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e) {
HyperLinkBrick hyperBrick = new HyperLinkBrick("http://www.devexpress.com",
"Developer Express Inc.");
printingSystem1.Begin();
// Specify the page area to draw a brick.
printingSystem1.Graph.Modifier = BrickModifier.Detail;
// Add the brick with specified dimensions to the document.
printingSystem1.Graph.DrawBrick(hyperBrick, new RectangleF(0, 0, 300, 20));
printingSystem1.End();
printingSystem1.PreviewFormEx.Show();
}
private void button2_Click(object sender, EventArgs e) {
Brick brick = new EllipseBrick(Color.LightGreen, Color.Blue);
printingSystem1.Begin();
IBrickGraphics graph = printingSystem1.Graph;
// Specify the page area to draw a brick.
printingSystem1.Graph.Modifier = BrickModifier.Detail;
// Add the brick with specified dimensions to the document.
graph.DrawBrick(brick, new RectangleF(0, 0, 150, 100));
printingSystem1.End();
printingSystem1.PreviewFormEx.Show();
}
}
}