当前位置: 首页>>代码示例>>C#>>正文


C# Forms.ToolStripItemEventArgs类代码示例

本文整理汇总了C#中System.Windows.Forms.ToolStripItemEventArgs的典型用法代码示例。如果您正苦于以下问题:C# ToolStripItemEventArgs类的具体用法?C# ToolStripItemEventArgs怎么用?C# ToolStripItemEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ToolStripItemEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripItemEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: msMain_ItemAdded

 private void msMain_ItemAdded(object sender, ToolStripItemEventArgs e)
 {
     if (e.Item.Text == "" || e.Item.Text == "还原(&R)" || e.Item.Text == "最小化(&N)" || e.Item.Text == "关闭(&C)")
     {
         msMain.Items.RemoveAt(e.Item.MergeIndex);
     }
 }
开发者ID:hdkn235,项目名称:PasswordTool,代码行数:7,代码来源:FrmMain.cs

示例2: OnItemAdded

        /// <summary>
        /// OnItemAdded-Event we adjust the font and forecolor of this item
        /// </summary>
        /// <param name="e"></param>
        protected override void OnItemAdded(ToolStripItemEventArgs e)
        {
            e.Item.Font = MetroUI.Style.BaseFont;
            e.Item.ForeColor = MetroUI.Style.ForeColor;

            base.OnItemAdded(e);
        }
开发者ID:ajmd17,项目名称:apexengine-sharp,代码行数:11,代码来源:MetroToolbar.cs

示例3: menuTop_ItemAdded

 /// <summary>顶部菜单-项添加事件</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void menuTop_ItemAdded(object sender, ToolStripItemEventArgs e)
 {
     if (e.Item.Text.Length == 0)
     {
         e.Item.Visible = false;
     }
 }
开发者ID:qpyun,项目名称:DomainModelPlatform,代码行数:10,代码来源:Main.cs

示例4: OnItemAdded

 protected override void OnItemAdded(ToolStripItemEventArgs e)
 {
     if (SecurityExclude(e.Item))
         Items.Remove(e.Item);
     else
         base.OnItemAdded(e);
 }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabPublicSource,代码行数:7,代码来源:AnimatMenuStrip.cs

示例5: OnItemRemoved

        private void OnItemRemoved(object sender, ToolStripItemEventArgs e)
        {
            if (e.Item != _item)
                return;

            RegisterEvents(register: false);
            _lifetime.Dispose();
        }
开发者ID:Giftednewt,项目名称:audio-switcher,代码行数:8,代码来源:ToolStripItemCommandBinding.cs

示例6: OnItemAdded

 /// <summary>
 /// When button is added, listen for it's hover events
 /// </summary>
 private void OnItemAdded(Object sender, ToolStripItemEventArgs e)
 {
     if (e.Item is ToolStripButton)
     {
         e.Item.MouseEnter += new EventHandler(this.OnOverChange);
         e.Item.MouseLeave += new EventHandler(this.OnOverChange);
     }
 }
开发者ID:Gr33z00,项目名称:flashdevelop,代码行数:11,代码来源:ToolStripEx.cs

示例7: menuStrip1_ItemAdded

        private void menuStrip1_ItemAdded(object sender, ToolStripItemEventArgs e)
        {
            if (e.Item.Text.Length == 0 || e.Item.Text == "还原(&R)" || e.Item.Text == "最小化(&N)"||e.Item.Text == "关闭(&C)")

            {
                e.Item.Visible = false;
            }
        }
开发者ID:fyyc1204,项目名称:MTSICS,代码行数:8,代码来源:MDIFORM.cs

示例8: m_obRight_ItemAdded

 //�ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡο����Ӧ����
 void m_obRight_ItemAdded(object sender, ToolStripItemEventArgs e)
 {
     m_obContRight.Width = 900;
     int width = Button_item_slot;
     for (int i = 0; i < m_obRight.Items.Count; i++)
     {
         width += m_obRight.Items[i].Width;
     }
     m_obContRight.Width = width;
 }
开发者ID:r1ng0to3tour,项目名称:swsplayer,代码行数:11,代码来源:ShoulderToolBar.cs

示例9: OnItemAdded

        protected override void OnItemAdded(ToolStripItemEventArgs e)
        {
            var button = e.Item as ToolStripButton;

            if (button != null)
                button.CheckedChanged += button_CheckedChanged;

            var dropDownButton = e.Item as ToolStripDropDownButton;

            if (dropDownButton != null)
                dropDownButton.DropDownItemClicked += dropDownButton_DropDownItemClicked;

            base.OnItemAdded(e);
        }
开发者ID:shanwei,项目名称:xenadmin,代码行数:14,代码来源:NavigationToolStrip.cs

示例10: ItemAdded

        internal void ItemAdded(object sender, ToolStripItemEventArgs e)
        {
            if (e.Item is IActionNameContainer)
            {
                var anc = e.Item as IActionNameContainer;
                if (anc.ActionName != ActionNames.None)
                {
                    actionitems.Add(anc.ActionName.ToString(), e.Item as ToolStripItem);
                    var actionManager = Services.ServiceProvider.GetInstance().GetService<IActionManager>();
                    actionManager.Actions[anc.ActionName].EnabledChanged +=
                        new EventHandler(ActionEnabledChanged);
                }
            }

            if (e.Item is ToolStripMenuItem)
            {
                var menuItem = (e.Item as ToolStripMenuItem);
                menuItem.Click += new EventHandler(ItemClick);
                foreach (System.Windows.Forms.ToolStripItem subitem in menuItem.DropDownItems)
                {
                    ItemAdded(e.Item, new ToolStripItemEventArgs(subitem));
                }
            }
        }
开发者ID:dbremner,项目名称:cecilstudio,代码行数:24,代码来源:BarControl.cs

示例11: OnItemAdded

 protected internal virtual void OnItemAdded(ToolStripItemEventArgs e)
 {
     this.DoLayoutIfHandleCreated(e);
     if ((!this.HasVisibleItems && (e.Item != null)) && ((IArrangedElement) e.Item).ParticipatesInLayout)
     {
         this.HasVisibleItems = true;
     }
     ToolStripItemEventHandler handler = (ToolStripItemEventHandler) base.Events[EventItemAdded];
     if (handler != null)
     {
         handler(this, e);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:13,代码来源:ToolStrip.cs

示例12: menuStrip_ItemAdded

		private void menuStrip_ItemAdded(object sender, ToolStripItemEventArgs e)
		{
			// Translate the items in the menu by finding their Tags in the translation file.
			foreach (ToolStripMenuItem objItem in menuStrip.Items.OfType<ToolStripMenuItem>())
			{
				if (objItem.Tag != null)
				{
					objItem.Text = LanguageManager.Instance.GetString(objItem.Tag.ToString());
				}
			}
		}
开发者ID:AMDX9,项目名称:chummer5a,代码行数:11,代码来源:frmMain.cs

示例13: toolStrip_ItemRemoved

		private void toolStrip_ItemRemoved(object sender, ToolStripItemEventArgs e)
		{
			// ToolStrip Items.
			foreach (ToolStrip objToolStrip in this.Controls.OfType<ToolStrip>())
			{
				foreach (ToolStripButton objButton in objToolStrip.Items.OfType<ToolStripButton>())
				{
					if (objButton.Tag != null)
						objButton.Text = LanguageManager.Instance.GetString(objButton.Tag.ToString());
				}
			}
		}
开发者ID:AMDX9,项目名称:chummer5a,代码行数:12,代码来源:frmMain.cs

示例14: menuMain_ItemAdded

 private void menuMain_ItemAdded(object sender, ToolStripItemEventArgs e)
 {
     if (e.Item.Text == "")
     {
         e.Item.Image = null;
     }
 }
开发者ID:itcthienkhiem,项目名称:DienLucHocMonCT,代码行数:7,代码来源:MDIMain.cs

示例15: OnItemAdded

        /// <summary>
        /// Raises the <see cref="E:System.Windows.Forms.ToolStrip.ItemAdded"/> event.
        /// </summary>
        /// <param name="e">A <see cref="T:System.Windows.Forms.ToolStripItemEventArgs"/> that contains the event data.</param>
        protected override void OnItemAdded(ToolStripItemEventArgs e)
        {
            base.OnItemAdded(e);

            if (ProgressBar == null)
            {
                ToolStripProgressBar pb = e.Item as ToolStripProgressBar;
                if (pb != null)
                {
                    ProgressBar = pb;
                }
            }

            if (ProgressLabel == null)
            {
                ToolStripStatusLabel sl = e.Item as ToolStripStatusLabel;
                if (sl != null)
                {
                    ProgressLabel = sl;
                }
            }
        }
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:26,代码来源:SpatialStatusStrip.cs


注:本文中的System.Windows.Forms.ToolStripItemEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。