private void CreateItemList(String filter) { ListBoxItem.Items.Clear(); var items = Info.Instance().Items; if (Type == eType.eWeapon) { items = Info.Instance().Weapons; } else if (Type == eType.eArmor) { items = Info.Instance().Armors; } else if (Type == eType.eAccessory) { items = Info.Instance().Accessorys; } foreach (var item in items) { if (String.IsNullOrEmpty(filter) || item.Name.IndexOf(filter) >= 0) { ListBoxItem.Items.Add(item); } } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { for (int i = 0; i < Info.Instance().Materias.Count; i++) { if (Info.Instance().Materias[i].Value == (uint)value) { return(i); } } return(-1); }
public DataContext() { foreach (var member in Info.Instance().Members) { if (member.Value >= 9) { continue; } Charactors.Add(new Charactor(member.Name, 93 + member.Value * 132)); } for (uint i = 0; i < 320; i++) { Items.Add(new Item(1285 + i * 2)); } for (uint i = 0; i < 200; i++) { Materias.Add(new Materia(1925 + i * 4)); } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return(Info.Instance().Search(Info.Instance().Accessorys, (uint)value)?.Name); }
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return(Info.Instance().Materias[(int)value].Value); }