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
/
RepositoryItemCustomBreadCrumbEdit.cs
59 lines (52 loc) · 2 KB
/
RepositoryItemCustomBreadCrumbEdit.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
55
56
57
58
59
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using DevExpress.XtraEditors.Drawing;
using DevExpress.XtraEditors.Registrator;
using DevExpress.XtraEditors.Repository;
namespace WindowsFormsApplication25 {
[UserRepositoryItem("RegisterCustomBreadCrumbEdit")]
public class RepositoryItemCustomBreadCrumbEdit : RepositoryItemBreadCrumbEdit {
static RepositoryItemCustomBreadCrumbEdit() {
RegisterCustomBreadCrumbEdit();
}
public const string CustomEditName = "CustomBreadCrumbEdit";
public RepositoryItemCustomBreadCrumbEdit() {
}
public override string EditorTypeName {
get {
return CustomEditName;
}
}
public static void RegisterCustomBreadCrumbEdit() {
Image img = null;
EditorRegistrationInfo.Default.Editors.Add(new EditorClassInfo(CustomEditName, typeof(CustomBreadCrumbEdit), typeof(RepositoryItemCustomBreadCrumbEdit), typeof(CustomBreadCrumbEditViewInfo), new BreadCrumbEditPainter(), true, img));
}
private bool _allowDropDownButtonSelectedState;
public bool AllowDropDownButtonSelectedState {
get {
return _allowDropDownButtonSelectedState;
}
set {
if(_allowDropDownButtonSelectedState != value) {
_allowDropDownButtonSelectedState = value;
OnPropertiesChanged();
}
}
}
public override void Assign(RepositoryItem item) {
BeginUpdate();
try {
base.Assign(item);
RepositoryItemCustomBreadCrumbEdit source = item as RepositoryItemCustomBreadCrumbEdit;
if(source == null)
return;
_allowDropDownButtonSelectedState = source.AllowDropDownButtonSelectedState;
} finally {
EndUpdate();
}
}
}
}