Small cleanups

This commit is contained in:
Cuyler36 2020-08-25 18:38:52 -04:00
parent b703b74e89
commit fd5d1c23c3
2 changed files with 4 additions and 20 deletions

View file

@ -1,14 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ACSE.Core.Items;
using ACSE.Core.Saves;
namespace ACSE.WinForms.Controls
{
@ -17,17 +10,14 @@ namespace ACSE.WinForms.Controls
/// </summary>
public partial class ItemDisplay : UserControl
{
public Item Item
{
get;
}
public ItemDisplay(Core.Items.Item item)
public Item Item { get; }
public ItemDisplay(Item item)
{
InitializeComponent();
//preview.Image = Inventory.GetItemPic(70, item, Save.SaveInstance.SaveType);
BackColor = Color.FromArgb((int)ItemData.GetItemColor(item.Type));
nameLabel.Text = item.Name;
IDlabel.Text = "ID: " + item.ItemId.ToString("X4");
IDlabel.Text = $"ID: {item.ItemId:X4}";
categoryLabel.Text = Enum.GetName(typeof(ItemType), item.Type);
Item = item;
}

View file

@ -1,11 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ACSE.Core.Villagers;