Esempio n. 1
0
 public ItemPanel(IEquipmentItem item, int quantity, ItemForm parentForm)
 {
     InitializeComponent();
     pictureBox1.Image   = ImageHelper.GetItemImageById(item.ID);
     lblItemName.Text    = item.Name;
     lblDescription.Text = item.Description;
     btnAction.Text      = $"{quantity.ToString()}x";
     ID          = item.ID;
     _parentForm = parentForm;
 }
Esempio n. 2
0
        private void ShowItemForm()
        {
            ItemForm playerEquipmentForm = new ItemForm(_equipment, _playerParty, this);

            if (!StaticMain.openedForms.Where(x => x.Name == playerEquipmentForm.Name).Any())
            {
                StaticMain.FormOpened(playerEquipmentForm);
                playerEquipmentForm.Location = new Point(this.Location.X + this.Size.Width, this.Location.Y);
                playerEquipmentForm.BringToFront();
                playerEquipmentForm.Show();
            }
        }