This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DrawButtonEventArgs.cs
54 lines (47 loc) · 1.62 KB
/
DrawButtonEventArgs.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
49
50
51
52
53
54
using System;
using System.Collections.Generic;
using System.Linq;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraEditors.Drawing;
using DevExpress.Utils.Drawing;
using System.Drawing;
using DevExpress.Utils;
namespace CustomDrawButtonEvent {
public class DrawButtonEventArgs {
public DrawButtonEventArgs(EditorButtonObjectInfoArgs info) {
this.info = info;
handled = false;
}
private EditorButtonObjectInfoArgs info;
private bool handled;
public bool Handled {
get {
return handled;
}
set {
if (handled != value)
handled = value;
}
}
public ObjectState State {
get {
return info.State;
}
set {
if (info.State != value) {
info.State = value;
}
}
}
public AppearanceObject Appearance { get { return info.Appearance; } }
public int Index { get { return info.Button.Index; } }
public string Caption { get { return info.Button.Caption; } }
public Graphics Graphics { get { return info.Graphics; } }
public GraphicsCache Cache { get { return info.Cache; } }
public Rectangle Bounds { get { return info.Bounds; } }
public Image Image { get { return info.Button.Image; } }
public ButtonPredefines Kind { get { return info.Button.Kind; } }
public ImageLocation ImageLocation { get { return info.Button.ImageLocation; } }
}
}