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 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 moreAttrBtn_Click(object sender, RoutedEventArgs e)
 {
     Item itembox = new Item();
     itembox.ShowDialog();
     string[] tempa = itembox.returnStr();
     if (tempa[0] != "ench:[]")
     {
         globalEnchString = tempa[0];
         enchantBox.Text = globalEnchString;
     }
     else
     {
         globalEnchString = enchantBox.Text;
     }
     if (tempa[1] != "display:{}")
     {
         globalNLString = tempa[1];
         nlBox.Text = globalNLString;
     }
     else
     {
         globalNLString = nlBox.Text;
     }
     if (tempa[2] != "AttributeModifiers:[]")
     {
         globalAttrString = tempa[2];
         attrBox.Text = globalAttrString;
     }
     else
     {
         globalAttrString = attrBox.Text;
     }
     if (tempa[5] != "")
     {
         globalHideflag = tempa[5];
     }
 }
 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 void enchantMoreGetBtn_Click(object sender, RoutedEventArgs e)
 {
     Item itembox = new Item();
     itembox.ShowDialog();
     string[] temp = itembox.returnStr();
     if (temp[0] != "ench:[]")
     {
         globalEnchString = temp[0];
     }
     if (temp[1] != "display:{}")
     {
         globalNLString = temp[1];
     }
     if (temp[2] != "AttributeModifiers:[]")
     {
         globalAttrString = temp[2];
     }
     if (temp[5] != "")
     {
         globalHideflag = temp[5];
     }
 }
 private void itemBtn_Click(object sender, RoutedEventArgs e)
 {
     this.Hide();
     Item itembox = new Item();
     itembox.ShowDialog();
     this.Show();
 }
 private void functionsRandomEnchantBtn_Click(object sender, RoutedEventArgs e)
 {
     Item itembox = new Item();
     itembox.ShowDialog();
     string enchlist = itembox.returnStr()[11];
     string[] ench = enchlist.Split(',');
     globalEnchList = "[";
     for (int i = 0; i < ench.Length; i++)
     {
         globalEnchList += "\"" + ench[i] + "\",";
     }
     if (globalEnchList != "[") globalEnchList = globalEnchList.Substring(0, globalEnchList.Length - 1);
     globalEnchList += "]";
 }
 private void EntryGetItem_Click(object sender, RoutedEventArgs e)
 {
     Item itembox = new Item();
     itembox.ShowDialog();
     EntryItemSel.SelectedIndex = itembox.returnStrAdver()[0];
 }