private void tabOther1ClearItemSel_Click(object sender, RoutedEventArgs e) { globalEnchString = ""; globalNLString = ""; globalAttrString = ""; globalHideflag = ""; globalItemSel = 0; globalItemCount = 0; globalItemMeta = 0; globalHideSelIndex = 0; Item itembox = new Item(); itembox.ShowDialog(); string[] tempa = itembox.returnStr(); int[] tempb = itembox.returnStrAdver(); if (tempa[0] != "ench:[]") { globalEnchString = tempa[0]; } if (tempa[1] != "display:{}") { globalNLString = tempa[1]; } if (tempa[2] != "AttributeModifiers:[]") { globalAttrString = tempa[2]; } if (tempa[5] != "") { globalHideflag = tempa[5]; } if (tempb[0] != 0) { globalItemSel = tempb[0]; } globalItemCount = tempb[1]; globalItemMeta = tempb[2]; }
private void getItemBtn_Click(object sender, RoutedEventArgs e) { Item itembox = new Item(); itembox.ShowDialog(); string[] temp = itembox.returnStr(); int[] temp2 = itembox.returnStrAdver(); if (temp2[0] != 0) { hand.SelectedIndex = temp2[0]; } if (temp2[1] != 1) { handCount.Value = temp2[1]; } if (temp2[2] != 0) { handMeta.Value = temp2[2]; } if (temp[10] != "") { getItemText.Text = temp[10]; } }
private string[] getItem() { Item itembox = new Item(); itembox.ShowDialog(); string nbt = itembox.returnStr()[10]; int[] temp = itembox.returnStrAdver(); AllSelData asd = new AllSelData(); return new string[] { nbt, asd.getItemNameList(temp[0]), temp[1].ToString(), temp[2].ToString(), asd.getItem(temp[0]) }; }
private void EntryGetItem_Click(object sender, RoutedEventArgs e) { Item itembox = new Item(); itembox.ShowDialog(); EntryItemSel.SelectedIndex = itembox.returnStrAdver()[0]; }