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
/
RepositoryItemMyRadioGroup.cs
78 lines (57 loc) · 1.94 KB
/
RepositoryItemMyRadioGroup.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System;
using System.ComponentModel;
using DevExpress.XtraEditors.Repository;
using DevExpress.XtraEditors.Registrator;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraEditors.Drawing;
using DevExpress.XtraEditors;
namespace TestMyRadioGroup
{
[UserRepositoryItem("RegisterMyRadioGroup")]
public class RepositoryItemMyRadioGroup : RepositoryItemRadioGroup
{
internal const string EDITORTypeName = "MyRadioGroup";
public override string EditorTypeName
{
get
{
return EDITORTypeName;
}
}
[Browsable(false)]
public new MyRadioGroup OwnerEdit
{
get
{
return base.OwnerEdit as MyRadioGroup;
}
}
[Description("Gets the collection of items displayed by the current radio group editor."),
Category(CategoryName.Data),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
Editor("System.ComponentModel.Design.CollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor)),
Localizable(true)]
public new MyRadioGroupItemCollection Items
{
get { return base.Items as MyRadioGroupItemCollection; }
}
static RepositoryItemMyRadioGroup()
{
RegisterMyRadioGroup();
}
public RepositoryItemMyRadioGroup()
: base()
{
}
public static void RegisterMyRadioGroup()
{
EditorRegistrationInfo.Default.Editors.Add(new EditorClassInfo(EDITORTypeName,
typeof(MyRadioGroup), typeof(RepositoryItemMyRadioGroup),
typeof(MyRadioGroupViewInfo), new RadioGroupPainter(), true, null));
}
protected override RadioGroupItemCollection CreateItemCollection()
{
return new MyRadioGroupItemCollection();
}
}
}