當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。