forked from Blackfrosch/VAGEDCSuite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmCodeBlocks.cs
48 lines (43 loc) · 1.27 KB
/
frmCodeBlocks.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;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
namespace VAGSuite
{
public partial class frmCodeBlocks : DevExpress.XtraEditors.XtraForm
{
public frmCodeBlocks()
{
InitializeComponent();
}
private void frmCodeBlocks_Load(object sender, EventArgs e)
{
gridControl1.DataSource = Tools.Instance.codeBlockList;
}
private void gridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
{
if (e.Column.Name == "colStartAddress" || e.Column.Name == "colEndAddress" || e.Column.Name == "colAddressID")
{
try
{
if (e.CellValue != null)
{
int addr = Convert.ToInt32(e.CellValue);
e.DisplayText = addr.ToString("X8");
}
}
catch(Exception)
{
}
}
}
private void simpleButton1_Click(object sender, EventArgs e)
{
this.Close();
}
}
}