-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathToolboxWindow.cs
68 lines (60 loc) · 3.26 KB
/
ToolboxWindow.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
using System.ComponentModel;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace Smart.FormDesigner.Demo
{
public partial class ToolboxWindow : DockContent
{
public ToolboxWindow()
{
InitializeComponent();
InitToolbox();
}
private void InitToolbox()
{
string groupName = "公共控件";
this.Toolbox.AddToolboxItem(typeof(Button), groupName);
this.Toolbox.AddToolboxItem(typeof(CheckBox), groupName);
this.Toolbox.AddToolboxItem(typeof(CheckedListBox), groupName);
this.Toolbox.AddToolboxItem(typeof(ComboBox), groupName);
this.Toolbox.AddToolboxItem(typeof(DateTimePicker), groupName);
this.Toolbox.AddToolboxItem(typeof(Label), groupName);
this.Toolbox.AddToolboxItem(typeof(LinkLabel), groupName);
this.Toolbox.AddToolboxItem(typeof(ListBox), groupName);
this.Toolbox.AddToolboxItem(typeof(ListView), groupName);
this.Toolbox.AddToolboxItem(typeof(MaskedTextBox), groupName);
this.Toolbox.AddToolboxItem(typeof(MonthCalendar), groupName);
this.Toolbox.AddToolboxItem(typeof(NotifyIcon), groupName);
this.Toolbox.AddToolboxItem(typeof(NumericUpDown), groupName);
this.Toolbox.AddToolboxItem(typeof(PictureBox), groupName);
this.Toolbox.AddToolboxItem(typeof(ProgressBar), groupName);
this.Toolbox.AddToolboxItem(typeof(RadioButton), groupName);
this.Toolbox.AddToolboxItem(typeof(RichTextBox), groupName);
this.Toolbox.AddToolboxItem(typeof(TextBox), groupName);
this.Toolbox.AddToolboxItem(typeof(ToolTip), groupName);
this.Toolbox.AddToolboxItem(typeof(TreeView), groupName);
this.Toolbox.AddToolboxItem(typeof(WebBrowser), groupName);
groupName = "容器";
this.Toolbox.AddToolboxItem(typeof(FlowLayoutPanel), groupName);
this.Toolbox.AddToolboxItem(typeof(GroupBox), groupName);
this.Toolbox.AddToolboxItem(typeof(Panel), groupName);
this.Toolbox.AddToolboxItem(typeof(SplitContainer), groupName);
this.Toolbox.AddToolboxItem(typeof(TabControl), groupName);
this.Toolbox.AddToolboxItem(typeof(TableLayoutPanel), groupName);
groupName = "菜单和工具栏";
this.Toolbox.AddToolboxItem(typeof(ContextMenuStrip), groupName);
this.Toolbox.AddToolboxItem(typeof(MenuStrip), groupName);
this.Toolbox.AddToolboxItem(typeof(StatusStrip), groupName);
this.Toolbox.AddToolboxItem(typeof(ToolStrip), groupName);
this.Toolbox.AddToolboxItem(typeof(ToolStripContainer), groupName);
groupName = "数据";
this.Toolbox.AddToolboxItem(typeof(BindingNavigator), groupName);
this.Toolbox.AddToolboxItem(typeof(BindingSource), groupName);
this.Toolbox.AddToolboxItem(typeof(DataGridView), groupName);
groupName = "组件";
this.Toolbox.AddToolboxItem(typeof(BackgroundWorker), groupName);
this.Toolbox.AddToolboxItem(typeof(ErrorProvider), groupName);
this.Toolbox.AddToolboxItem(typeof(Timer), groupName);
}
}
}