private void buttonEnchant_Click(object sender, EventArgs e) { IFormItemSelectionProvider form = (FormItemSelection ?? (this.FindForm() as IFormItemSelectionProvider)); if (form != null) { form.FormItemSelection.Show(this, CharacterSlot); } }
void ItemButton_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left && !ReadOnly) { IFormItemSelectionProvider form = (FormItemSelection ?? (this.FindForm() as IFormItemSelectionProvider)); if (form != null) { form.FormItemSelection.Show(this, CharacterSlot); } } else if (e.Button == MouseButtons.Right && SelectedItemInstance != null) { if (Control.ModifierKeys == Keys.Shift) { ItemContextualMenu.Instance.EquipCustomisedItem(SelectedItemInstance, CharacterSlot); } else { ItemContextualMenu.Instance.Show(Character, SelectedItemInstance, CharacterSlot, false); } } }