public CreateToolStripDropDownItems ( |
||
connectionTreeModel | ||
Результат | IEnumerable |
private void nI_MouseClick(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Right) { return; } _cMenCons.DropDownItems.Clear(); var menuItemsConverter = new ConnectionsTreeToMenuItemsConverter { MouseUpEventHandler = ConMenItem_MouseUp }; ToolStripItem[] rootMenuItems = menuItemsConverter.CreateToolStripDropDownItems(Runtime.ConnectionTreeModel).ToArray(); _cMenCons.DropDownItems.AddRange(rootMenuItems); }
private void btnConnections_DropDownOpening(object sender, EventArgs e) { btnConnections.DropDownItems.Clear(); var menuItemsConverter = new ConnectionsTreeToMenuItemsConverter { MouseUpEventHandler = ConnectionsMenuItem_MouseUp }; // ReSharper disable once CoVariantArrayConversion ToolStripItem[] rootMenuItems = menuItemsConverter.CreateToolStripDropDownItems(Runtime.ConnectionTreeModel).ToArray(); btnConnections.DropDownItems.AddRange(rootMenuItems); }
private void nI_MouseClick(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Right) return; _cMenCons.DropDownItems.Clear(); var menuItemsConverter = new ConnectionsTreeToMenuItemsConverter { MouseUpEventHandler = ConMenItem_MouseUp }; ToolStripItem[] rootMenuItems = menuItemsConverter.CreateToolStripDropDownItems(Runtime.ConnectionTreeModel).ToArray(); _cMenCons.DropDownItems.AddRange(rootMenuItems); }