RefreshContextMenuItems() public méthode

public RefreshContextMenuItems ( int scrollValue = -1 ) : void
scrollValue int
Résultat void
Exemple #1
0
        private void button_Delete_Click(object sender, EventArgs e)
        {
            if (ConfigWindow.GetContextMenuList().Count == 1)
            {
                RemoveItemFocus();
            }
            else
            {
                int index = ConfigWindow.GetContextMenuList().IndexOf(this);
                ConfigWindow.GetContextMenuList()[index != 0 ? index - 1 : index + 1].GiveItemFocus();
            }

            int scrollValue = ConfigWindow.GetContextMenuPanelScrollValue();

            ConfigWindow.GetContextMenuList().Remove(this);
            Parent.Controls.Remove(this);
            ConfigWindow.RefreshContextMenuItems(scrollValue);
        }