SIL.FieldWorks.FdoUi.CmObjectUi.MarkCtrlClickItem C# (CSharp) Метод

MarkCtrlClickItem() публичный статический Метод

Given a populated choice group, mark the one that will be invoked by a ctrl-click. This method is typically used as the menuAdjuster argument in calling HandleRightClick. It's important that it marks the same menu item as selected by HandlCtrlClick.
public static MarkCtrlClickItem ( ContextMenuStrip menu ) : void
menu System.Windows.Forms.ContextMenuStrip
Результат void
		public static void MarkCtrlClickItem(ContextMenuStrip menu)
		{
			foreach (var item in menu.Items)
			{
				var item1 = item as ToolStripItem;
				if (item1 == null || !(item1.Tag is CommandChoice) || !item1.Enabled)
					continue;
				var command = (CommandChoice) item1.Tag;
				if (command.Message != "JumpToTool")
					continue;

				item1.Text += FdoUiStrings.ksCtrlClick;
				return;
			}
		}