-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.cs
40 lines (33 loc) · 1.21 KB
/
Main.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
namespace DXSample {
public partial class Main: XtraForm {
public Main() {
InitializeComponent();
}
private void OnLoad(object sender, EventArgs e) {
gridControl1.DataSource = GetData();
customEdit1.Image = SystemIcons.Shield.ToBitmap();
}
private static DataTable GetData()
{
DataTable dt = new DataTable();
dt.Columns.Add("Icon", typeof(Image));
dt.Columns.Add("IconName");
dt.Rows.Add(SystemIcons.Application.ToBitmap(), "Application");
dt.Rows.Add(SystemIcons.Asterisk.ToBitmap(), "Asterisk");
dt.Rows.Add(SystemIcons.Error.ToBitmap(), "Error");
dt.Rows.Add(SystemIcons.Exclamation.ToBitmap(), "Exclamation");
dt.Rows.Add(SystemIcons.Hand.ToBitmap(), "Hand");
dt.Rows.Add(SystemIcons.Information.ToBitmap(), "Information");
dt.Rows.Add(SystemIcons.Question.ToBitmap(), "Question");
return dt;
}
}
}