RemoveShortcuts() публичный Метод

public RemoveShortcuts ( MenuItem item ) : void
item MenuItem
Результат void
Пример #1
0
            public virtual void Clear()
            {
                MenuTracker tracker = owner.Tracker;

                foreach (MenuItem item in items)
                {
                    if (tracker != null)
                    {
                        tracker.RemoveShortcuts(item);
                    }
                    item.parent_menu = null;
                }
                items.Clear();
                owner.OnMenuChanged(EventArgs.Empty);
            }
Пример #2
0
            public virtual void RemoveAt(int index)
            {
                if (index < 0 || index >= Count)
                {
                    throw new ArgumentOutOfRangeException("Index of out range");
                }

                MenuItem    item    = (MenuItem)items [index];
                MenuTracker tracker = owner.Tracker;

                if (tracker != null)
                {
                    tracker.RemoveShortcuts(item);
                }
                item.parent_menu = null;

                items.RemoveAt(index);

                UpdateItemsIndices();
                owner.OnMenuChanged(EventArgs.Empty);
            }