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.
40 lines
1017 B
C#
40 lines
1017 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using System.Drawing;
|
|
|
|
namespace Mesnac.Controls.Default
|
|
{
|
|
[ToolboxBitmap(typeof(ToolStrip))]
|
|
public partial class MCtoolStrip : ToolStrip
|
|
{
|
|
public MCtoolStrip()
|
|
{
|
|
InitializeComponent();
|
|
this.ItemAdded += new ToolStripItemEventHandler(MCtoolStrip_ItemAdded);
|
|
}
|
|
|
|
public MCtoolStrip(IContainer container)
|
|
{
|
|
container.Add(this);
|
|
|
|
InitializeComponent();
|
|
this.ItemAdded += new ToolStripItemEventHandler(MCtoolStrip_ItemAdded);
|
|
|
|
}
|
|
|
|
private void MCtoolStrip_ItemAdded(object sender, ToolStripItemEventArgs e)
|
|
{
|
|
ToolStripItem item = e.Item;
|
|
if (item.GetType().IsSubclassOf(typeof(ToolStripControlHost)))
|
|
{
|
|
this.Items.Remove(e.Item);
|
|
}
|
|
}
|
|
}
|
|
}
|