1 Star 0 Fork 1

nik/FormDesigner.Demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ToolboxWindow.cs 3.26 KB
一键复制 编辑 原始数据 按行查看 历史
sants 提交于 2018-11-20 17:17 . No commit message
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);
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhu596861877/FormDesigner.Demo.git
git@gitee.com:zhu596861877/FormDesigner.Demo.git
zhu596861877
FormDesigner.Demo
FormDesigner.Demo
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385