public void SwitchList(Enum_Item _ItemsType) { if (_ItemsType != Enum_Item.None) { this.WrapPanel_ItemCraft.Children.Clear(); foreach (Items Item in TacheFond.ListItems) { if (Item.GetNeeded_Type1 != Enum_Item.None) { if (_ItemsType == Item.GetNeeded_Type1 || _ItemsType == Item.GetNeeded_Type2) { this.WrapPanel_ItemCraft.Children.Add(new ItemCraft(Item, _ItemsType) { Height = 60 }); } } } TacheFond.GetMainRef.Image_Item.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Armor.png", UriKind.Relative)); this.IsOnListChampion = false; this.ListItemCraft.Visibility = Visibility.Visible; this.ListChampion.Visibility = Visibility.Hidden; } else { this.IsOnListChampion = true; this.ListItemCraft.Visibility = Visibility.Hidden; this.ListChampion.Visibility = Visibility.Visible; } }
public Items(string _Name, Enum_Item _ItemType, Enum_Item _Needed_Type1, Enum_Item _Needed_Type2, string _Description) { this.Name = _Name; this.Description = _Description; this.ItemType = _ItemType; this.ItemIcon = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Items/{this.ItemType.ToString()}.png", UriKind.Relative)); this.Needed_Type1 = _Needed_Type1; this.Needed_Type2 = _Needed_Type2; }