Пример #1
0
        void listBoxItems_DrawItem(object sender, DrawItemEventArgs e)

        {
            if (e.Index < 0)
            {
                return;
            }

            e.DrawBackground();
            e.DrawFocusRectangle();

            Color c = Color.Gray;

            GameItem selectedItem = null;

            if (listBoxItems.Items[e.Index].GetType().Name == "GameItem")
            {
                selectedItem = (GameItem)listBoxItems.Items[e.Index];
                c            = selectedItem.Color;
            }

            e.Graphics.DrawString(listBoxItems.Items[e.Index].ToString(), new Font(FontFamily.GenericSansSerif, 8, FontStyle.Bold), new SolidBrush(c), e.Bounds);
        }
Пример #2
0
 public GameItem(GameItem item) : base(item.Name, null, item.Color)
 {
     _wear     = item.MinWear + ItemFactory.GetRandomNumber() * (item.MaxWear - item.MinWear);
     _rarity   = item.Rarity;
     _imageURL = item.ImageURL;
 }
Пример #3
0
 public static GameItem GetCollection(GameItem item)
 {
     //Delegate del =
     return(null);
 }