• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.ToolStripItemClickedEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: contextMenuStrip1_ItemClicked

 private void contextMenuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     try
     {
         if (e.ClickedItem == mnuAdd)
         {
             this.AddMachine();
         }
         if (e.ClickedItem == mnuDelete)
         {
             if (dataGridView1.SelectedRows[0] != null)
             {
                 ContextMenuStrip context = sender as ContextMenuStrip;
                 context.Close();
                 this.DeleteMachine(dataGridView1.SelectedRows[0]);
             }
         }
         if (e.ClickedItem == mnuEdit)
         {
             if (dataGridView1.SelectedRows != null && dataGridView1.SelectedRows.Count > 0)
             {
                 this.EditMachine(dataGridView1.SelectedRows[0]);
             }
         }
     }
     catch(Exception ex)
     {
         Log.LogError("contextMenuStrip1_ItemClicked", ex);
     }
 }
开发者ID:PosauneMaster,项目名称:RecipeMaster_v3,代码行数:30,代码来源:SettingsForm.cs


示例2: CotxMenu_ItemClicked

        private void CotxMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            switch (e.ClickedItem.ToString())
            {
                case "Editar":
                    lblTitulo.Text = "Editar Cliente";
                    txtNombre.Text = grid.Rows[currentMouseOverRow].Cells[1].Value.ToString();
                    txtAp.Text = grid.Rows[currentMouseOverRow].Cells[2].Value.ToString();
                    txtAm.Text = grid.Rows[currentMouseOverRow].Cells[3].Value.ToString();
                    txtCalle.Text = grid.Rows[currentMouseOverRow].Cells[4].Value.ToString();
                    txtColonia.Text = grid.Rows[currentMouseOverRow].Cells[6].Value.ToString();
                    txtNumero.Text = grid.Rows[currentMouseOverRow].Cells[5].Value.ToString();
                    txtCP.Text = grid.Rows[currentMouseOverRow].Cells[7].Value.ToString();
                    txtRFC.Text = grid.Rows[currentMouseOverRow].Cells[14].Value.ToString();
                    string fecha = grid.Rows[currentMouseOverRow].Cells[9].Value.ToString();

                    DateTime dt = DateTime.Parse(fecha);
                    DateFechaNacimiento.Value = dt;
                    if (grid.Rows[currentMouseOverRow].Cells[11].Value.ToString() == "M")
                        radHombre.Checked = true;
                    else
                        radMujer.Checked = true;

                    Dialogo("Editar Producto");
                    break;
                case "Eliminar":
                    //manda un mensaje de si esta seguro (solo es logico)
                    break;
            }
        }
开发者ID:rigo9412,项目名称:Proyecto-T.B.D.,代码行数:30,代码来源:FormClientes.cs


示例3: OnMenuClicked

 void OnMenuClicked(object sender, ToolStripItemClickedEventArgs args)
 {
     foreach (var i in _guiElements) {
         if (i.MenuTitle == args.ClickedItem.Text)
             i.Form.Show();
     }
 }
开发者ID:Maicke98,项目名称:MCForge-Vanilla,代码行数:7,代码来源:MCForgeGuiManager.cs


示例4: ctxColumns_ItemClicked

		void ctxColumns_ItemClicked(object sender, ToolStripItemClickedEventArgs e)	{
			// F4.CheckOnClick=False because mni stays unchecked after I just checked
			ToolStripMenuItem mni = e.ClickedItem as ToolStripMenuItem;
			if (mni == null) {
				string msg = "You clicked on something not being a ToolStripMenuItem";
				Assembler.PopupException(msg);
				return;
			}
			mni.Checked = !mni.Checked;
			if (columnsByFilters.ContainsKey(mni) == false) {
				string msg = "Add ToolStripMenuItem[" + mni.Name + "] into columnsByFilters";
				Assembler.PopupException(msg);
				return;
			}
			bool newCheckedState = mni.Checked;
			// F4.CheckOnClick=true mni.Checked = newState;
//			this.settingsManager.Set("ExecutionForm." + mni.Name + ".Checked", mni.Checked);
//			this.settingsManager.SaveSettings();

			List<OLVColumn> columns = columnsByFilters[mni];
			if (columns.Count == 0) return;

			foreach (OLVColumn column in columns) {
				column.IsVisible = newCheckedState;
			}
			this.OrdersTree.RebuildColumns();
		}
开发者ID:sanyaade-fintechnology,项目名称:SquareOne,代码行数:27,代码来源:ExecutionTreeControl.EventConsumer.cs


示例5: dropDownButton_DropDownItemClicked

        private void dropDownButton_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            var curItem = e.ClickedItem as ToolStripMenuItem;

            if (curItem == null || !curItem.Checked)
                return;

            foreach (var toolStripItem in Items)
            {
                var buttonItem = toolStripItem as ToolStripButton;

                if (buttonItem != null && buttonItem.Checked)
                    buttonItem.Checked = false;

                var dropDownButton = toolStripItem as ToolStripDropDownButton;

                if (dropDownButton != null && dropDownButton != curItem.OwnerItem)
                {
                    foreach (ToolStripMenuItem item in dropDownButton.DropDownItems)
                        item.Checked = false;
                }
            }

            Invalidate();
        }
开发者ID:huizh,项目名称:xenadmin,代码行数:25,代码来源:NavigationToolStrip.cs


示例6: MenuItemClicked

        private void MenuItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            ToolStripMenuItem menuItem = e.ClickedItem as ToolStripMenuItem;

            if (menuItem == null)
                return;

            switch (menuItem.Text)
            {
                case EXPORT_TO_EXCEL:
                    ToExcel();
                    break;

                case EXPORT_TO_CSV:
                    ToCsv();
                    break;

                case SEARCH:
                    ShowSearch();
                    break;

                default:
                    if (!menuItem.Checked || Columns.GetColumnCount(DataGridViewElementStates.Visible) > 1)
                    {
                        DataGridViewColumn column = (DataGridViewColumn)menuItem.Tag;
                        column.Visible            = !menuItem.Checked;
                        menuItem.Checked          = column.Visible;
                    }
                    break;
            }
        }
开发者ID:atan888,项目名称:MMS,代码行数:31,代码来源:ExtendedDataGridView.ContextMenu.cs


示例7: AttachmentToolStrip_ItemClicked

        private void AttachmentToolStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            if (e.ClickedItem.Tag == null)
                return;
            else if(e.ClickedItem.Tag.ToString() == "Add")
            {
                OpenFileDialog dialog = new OpenFileDialog();

                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    ListViewItem item = new ListViewItem(Path.GetFileName(dialog.FileName) + " (" + ((double)(new FileInfo(dialog.FileName).Length / 1000)).ToString("f2") + " KB)");
                    item.ImageIndex = 0;
                    item.Tag = dialog.FileName;
                    this.attachments.Add(dialog.FileName);
                    this.Attachments.Items.Add(item);
                }
            }
            else if (e.ClickedItem.Tag.ToString() == "Delete")
            {
                if (this.Attachments.SelectedItems.Count > 0)
                {
                    this.attachments.Remove(this.Attachments.SelectedItems[0].Tag.ToString());
                    this.Attachments.SelectedItems[0].Remove();
                }
            }
        }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:26,代码来源:EmailClient.cs


示例8: bindingNavigator1_ItemClicked

 private void bindingNavigator1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Text == "关闭")
     {
         this.Close();
     }
     if (e.ClickedItem.Text == "上一页")
     {
         pageCurrent--;
         if (pageCurrent <= 0)
         {
             MessageBox.Show("已经是第一页,请点击“下一页”查看!");
             return;
         }
         else
         {
             nCurrent = pageSize * (pageCurrent - 1);
         }
         LoadData();
     }
     if (e.ClickedItem.Text == "下一页")
     {
         pageCurrent++;
         if (pageCurrent > pageCount)
         {
             MessageBox.Show("已经是最后一页,请点击“上一页”查看!");
             return;
         }
         else
         {
             nCurrent = pageSize * (pageCurrent - 1);
         }
         LoadData();
     }
 }
开发者ID:xfgxfg,项目名称:CropWatchField,代码行数:35,代码来源:AggregateToVillageForm.cs


示例9: editMenu_Clicked

 private void editMenu_Clicked(object sender, ToolStripItemClickedEventArgs e)
 {
     //srcGrid.SelectedColumns[0].Index
     source = srcGrid.SelectedCells[0];
     srcTab = cTab.SelectedIndex;
     cTab.SelectedIndex = destTab;
 }
开发者ID:micmax93,项目名称:AL_KAIDA_TRAVELS,代码行数:7,代码来源:TableJump.cs


示例10: FileToolBar_ItemClicked

 void FileToolBar_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem == tOpenDocument) Global.MainForm.Open();
     else if (e.ClickedItem == tSaveFile) Global.MainForm.DoSave();
     else if (e.ClickedItem == tSaveAll) Global.MainForm.DoSaveAll();
     else if (e.ClickedItem == tPrint) Global.MainForm.DoPrint();
     else if (e.ClickedItem == tPrintPreview) Global.MainForm.DoPrintPreview();
 }
开发者ID:NikolayIT,项目名称:NStudio,代码行数:8,代码来源:FileToolBar.cs


示例11: globalScriptsToolStripMenuItem_DropDownItemClicked

 private void globalScriptsToolStripMenuItem_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Tag != null)
     {
         var name = e.ClickedItem.Tag as string;
         PluginEngine.Default.ExecuteByName(name);
     }
 }
开发者ID:Emilgardis,项目名称:falloutsnip,代码行数:8,代码来源:MainView.Scripts.cs


示例12: ToolStrip1ItemClicked

 protected void ToolStrip1ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (ToolBarClick != null)
     {
         ToolBarClick(sender, e);
         
     }
 }
开发者ID:rehman922,项目名称:VIRETAIL,代码行数:8,代码来源:BaseToolBar.cs


示例13: lms_ItemClicked

 public void lms_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     try {
         Process.Start(Options.settings.Editor, Main.StartupPath + "/mariadb/data/" + e.ClickedItem.Text);
     } catch (Exception ex) {
         Log.wnmp_log_error(ex.Message, Log.LogSection.WNMP_MARIADB);
     }
 }
开发者ID:zjuyou,项目名称:wnmp,代码行数:8,代码来源:MariaDB.cs


示例14: ItemsListContextMenuItemClicked

		private void ItemsListContextMenuItemClicked(object sender, ToolStripItemClickedEventArgs e)
		{
			if (e.ClickedItem.Text == @"Copy value")
			{
				var selectedValue = _itemsListView.SelectedItems[0].Text;
				Clipboard.SetText(selectedValue);
			}
		}
开发者ID:martinjt,项目名称:elmah-loganalyzer,代码行数:8,代码来源:FilterSelector.cs


示例15: cMSTray_ItemClicked

 private void cMSTray_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Name == cMSTray_Start.Name)
         this.StartListenerThread();
     else if (e.ClickedItem.Name == cMSTray_Stop.Name)
         this.StopListenerThread();
     else if (e.ClickedItem.Name == cMSTray_Exit.Name)
         this.Close();
 }
开发者ID:henryford,项目名称:UDPLauncher_GUI,代码行数:9,代码来源:Main_Frm.cs


示例16: contextMenuStrip1_ItemClicked

 private void contextMenuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Text.StartsWith("Item"))
     {
         ToolStripMenuItem ptrMenu = (ToolStripMenuItem) e.ClickedItem;
         if (ptrMenu.HasDropDownItems) return;
         MessageBox.Show(ptrMenu.Text);
     }
 }
开发者ID:pckujawa,项目名称:MSChartExtension,代码行数:9,代码来源:Form1.cs


示例17: OnDropDownItemClicked

		protected override void OnDropDownItemClicked(ToolStripItemClickedEventArgs e) {
			ToolStripItem clickedItem = e.ClickedItem;
			if(Tag == null || !Tag.Equals(clickedItem.Tag)) {
				Tag = clickedItem.Tag;   
				Image = clickedItem.Image;
				if(PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("SelectedTag"));
			}
			base.OnDropDownItemClicked(e);
		}
开发者ID:logtcn,项目名称:greenshot,代码行数:9,代码来源:BindableToolStripDropDownButton.cs


示例18: EditToolBar_ItemClicked

 void EditToolBar_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem == tUndo) Global.MainForm.CurrentDocumentUndo();
     else if (e.ClickedItem == tRedo) Global.MainForm.CurrentDocumentRedo();
     else if (e.ClickedItem == tCut) Global.MainForm.CurrentDocumentCut();
     else if (e.ClickedItem == tCopy) Global.MainForm.CurrentDocumentCopy();
     else if (e.ClickedItem == tPaste) Global.MainForm.CurrentDocumentPaste();
     else if (e.ClickedItem == tDelete) Global.MainForm.CurrentDocumentDelete();
 }
开发者ID:NikolayIT,项目名称:NStudio,代码行数:9,代码来源:EditToolBar.cs


示例19: OnItemClicked

        protected override void OnItemClicked(ToolStripItemClickedEventArgs e)
        {
            AudioToolStripMenuItem item = e.ClickedItem as AudioToolStripMenuItem;
            if (item != null && !item.AutoCloseOnClick)
            {
                _cancelNextAttemptedClose = true;
            }

            base.OnItemClicked(e);
        }
开发者ID:Giftednewt,项目名称:audio-switcher,代码行数:10,代码来源:AudioContextMenuStrip.cs


示例20: cmsServer_ItemClicked

 private void cmsServer_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Name == "tsmCreateDataBase")
     {
         FrmCreateDataBase frmCdb = new FrmCreateDataBase(lstDb);
         DialogResult dr = frmCdb.ShowDialog(this);
         if (dr == System.Windows.Forms.DialogResult.OK)
             populateTreeView();
     }
 }
开发者ID:TMA-AQ,项目名称:AlgoQuest,代码行数:10,代码来源:FrmExplorer.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.ToolStripItemCollection类代码示例发布时间:2022-05-26
下一篇:
C# Forms.ToolStripItem类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap