public AddConfigWindowReference ( |
||
configWindow | ||
Результат | void |
private ContextMenuItem AddContextMenuItem(string name = "", string func = "", int subitem = 0, bool submenu = false, int position = -1) { List <ContextMenuItem> CurrentList = GetContextMenuList(); ContextMenuItem item = new ContextMenuItem(name, func); item.Location = new System.Drawing.Point(0, (item.Height - 2) * CurrentList.Count); GetCurrentContextMenuPanel().Controls.Add(item); if (position == -1) { // add to bottom CurrentList.Add(item); } else { // add at position CurrentList.Insert(position, item); RefreshContextMenuItems(); } item.AddConfigWindowReference(this); item.SetSubitem(subitem); item.SetSubmenu(submenu); return(item); }
private ContextMenuItem AddContextMenuItem(string name = "", string func = "", int subitem = 0, bool submenu = false, int position = -1) { List<ContextMenuItem> CurrentList = GetContextMenuList(); ContextMenuItem item = new ContextMenuItem(name, func, vimageConfig); item.Location = new System.Drawing.Point(0, (item.Height - 2) * CurrentList.Count); GetCurrentContextMenuPanel().Controls.Add(item); if (position == -1) { // add to bottom CurrentList.Add(item); } else { // add at position CurrentList.Insert(position, item); RefreshContextMenuItems(); } item.AddConfigWindowReference(this); item.SetSubitem(subitem); item.SetSubmenu(submenu); return item; }