-
Notifications
You must be signed in to change notification settings - Fork 54
/
DialogForm.cs
48 lines (41 loc) · 1.29 KB
/
DialogForm.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
42
43
44
45
46
47
48
using System.Drawing;
using Modern.Forms;
namespace ControlGallery
{
public class DialogForm : Form
{
public DialogForm ()
{
Text = "Dialog Form";
Size = new Size (500, 250);
var button1 = Controls.Add (new Button {
Text = "Set Form's DialogResult to Retry",
Left = 10,
Top = 44,
Width = 250
});
button1.Click += (o, e) => DialogResult = DialogResult.Retry;
var button2 = Controls.Add (new Button {
Text = "Set Form's DialogResult to Ignore",
Left = 10,
Top = 84,
Width = 250
});
button2.Click += (o, e) => DialogResult = DialogResult.Ignore;
var button3 = Controls.Add (new Button {
Text = "DialogResult.Abort button",
Left = 10,
Top = 124,
Width = 250,
DialogResult = DialogResult.Abort
});
var button4 = Controls.Add (new Button {
Text = "DialogResult.None button",
Left = 10,
Top = 164,
Width = 250,
DialogResult = DialogResult.None
});
}
}
}