-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm1.cs
More file actions
45 lines (39 loc) · 1.58 KB
/
Form1.cs
File metadata and controls
45 lines (39 loc) · 1.58 KB
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
42
43
44
45
#region usings
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using DevExpress.XtraPrinting;
#endregion
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) {
#region UsingEllipseBrick
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();
#endregion
}
}
}