You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.2 KiB
C#
60 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Mesnac.Controls.Default
|
|
{
|
|
public partial class MCToolBars : UserControl
|
|
{
|
|
public MCToolBars()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
List<CustomDropDownItem> _dropDownItems = new List<CustomDropDownItem>();
|
|
public List<CustomDropDownItem> DropDownItems
|
|
{
|
|
|
|
get { return _dropDownItems; }
|
|
set
|
|
{
|
|
_dropDownItems = value;
|
|
//if (value == null)
|
|
// return;
|
|
//foreach (CustomDropDownItem item in (List<CustomDropDownItem>)_dropDownItems)
|
|
//{
|
|
// switch (item.Itemtype)
|
|
// {
|
|
// case itemtype.MCToolStripButton:
|
|
// MCToolStripButton mcsb = new MCToolStripButton();
|
|
// mcsb.Name = item.Name;
|
|
// mcsb.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
|
// //mcsb.Image = ((System.Drawing.Image)(resources.GetObject("tableSizerDropDownButton.Image")));
|
|
// mcsb.ImageTransparentColor = System.Drawing.Color.Magenta;
|
|
|
|
// mcsb.Size = new System.Drawing.Size(29, 22);
|
|
// mcsb.Text = "Insert Table";
|
|
// bool isf = false;
|
|
// foreach (ToolStripItem itm in this.toolStrip1.Items)
|
|
// {
|
|
// if (itm.Name == item.Name)
|
|
// {
|
|
// isf = true;
|
|
// }
|
|
// }
|
|
// if (!isf)
|
|
// this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { mcsb });
|
|
// break;
|
|
// default:
|
|
// break;
|
|
//}
|
|
//}
|
|
}
|
|
}
|
|
}
|
|
}
|