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 _dropDownItems = new List(); public List DropDownItems { get { return _dropDownItems; } set { _dropDownItems = value; //if (value == null) // return; //foreach (CustomDropDownItem item in (List)_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; //} //} } } } }