本文整理汇总了C#中Item.returnStr方法的典型用法代码示例。如果您正苦于以下问题:C# Item.returnStr方法的具体用法?C# Item.returnStr怎么用?C# Item.returnStr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item.returnStr方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FrameGetItemBtn_Click
private void FrameGetItemBtn_Click(object sender, RoutedEventArgs e)
{
AllSelData asd = new AllSelData();
Item itembox = new Item();
itembox.ShowDialog();
string[] temp = itembox.returnStr();
int[] temp2 = itembox.returnStrAdver();
globalFrameItem[0] = temp2[1].ToString();//count
globalFrameItem[1] = temp2[2].ToString();//damage
globalFrameItem[2] = asd.getItem(temp2[0]);//id
globalFrameItem[3] = temp[10];//tag
}
示例2: tabSummonEnchantGetBtn_Click
private void tabSummonEnchantGetBtn_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[3] != "")
{
globalAttrStringLess = temp[3];
}
if (temp[4] != "")
{
globalUnbreaking = temp[4];
try
{
if (temp[4].Split(':')[1] == "1") { tabSummonUnbreaking.IsChecked = true; }
} catch (System.Exception) { }
}
int[] temp2 = itembox.returnStrAdver();
if (temp2[0] != 0)
{
tabSummonItem.SelectedIndex = temp2[0];
}
if (temp2[1] != 1)
{
tabSummonCount.Value = temp2[1];
}
if (temp2[2] != 0)
{
tabSummonMeta.Value = temp2[2];
}
if (temp2[3] != 0)
{
tabSummonHide.SelectedIndex = temp2[3];
}
}
示例3: HorseItemGet
private string[] HorseItemGet()
{
Item itembox = new Item();
itembox.ShowDialog();
string[] temp = itembox.returnStr();
int[] temp0 = itembox.returnStrAdver();
AllSelData asd = new AllSelData();
if (temp[10] == string.Empty)
{
return new string[] { asd.getItem(temp0[0]), temp0[1].ToString(), temp0[2].ToString(), string.Empty };
}
else
{
return new string[] { asd.getItem(temp0[0]), temp0[1].ToString(), temp0[2].ToString(), ",tag:{" + temp[10] + "}" };
}
}
示例4: tabVillagerGetBackMeta
private string[] tabVillagerGetBackMeta(string where2use)
{
int id = 0;
int count = 1;
int damage = 0;
globalEnchString = "";
globalNLString = "";
globalAttrString = "";
globalUnbreaking = "";
Item itembox = new Item();
itembox.ShowDialog();
string[] temp = itembox.returnStr();
int[] temp2 = itembox.returnStrAdver();
id = temp2[0];
count = temp2[1];
damage = temp2[2];
if (temp[0] != "ench:[]")
{
globalEnchString = temp[0];
}
if (temp[1] != "display:{}")
{
globalNLString = temp[1];
}
if (temp[2] != "AttributeModifiers:[]")
{
globalAttrString = temp[2];
}
if (temp[4] != "")
{
globalUnbreaking = temp[4];
}
if (temp[5] != "")
{
globalHideflag = temp[5];
}
string meta = "";
if (globalEnchString != "") meta += globalEnchString + ",";
if (globalNLString != "") meta += globalNLString + ",";
if (globalAttrString != "") meta += globalAttrString + ",";
if (globalUnbreaking != "") meta += globalUnbreaking + ",";
if (globalHideflag != "") meta += globalHideflag + ",";
if (temp[8] != "") meta += temp[8] + ",";
if (temp[9] != "") meta += temp[9] + ",";
if (globalEnchString != "" || globalNLString != "" || globalAttrString != "" || globalUnbreaking != "" || globalHideflag != "" || temp[8] != "" || temp[9] != "")
{
if (meta.Length >= 1)
{
meta = meta.Remove(meta.Length - 1, 1);
}
}
int[] itemboxreturn = itembox.returnStrAdver();
if (where2use == "MainHand") { sumosEquipmentMainHandId = itemboxreturn[0]; sumosEquipmentMainHandCount = itemboxreturn[1]; sumosEquipmentMainHandDamage = itemboxreturn[2]; }
else if (where2use == "OffHand") { sumosEquipmentOffHandId = itemboxreturn[0]; sumosEquipmentOffHandCount = itemboxreturn[1]; sumosEquipmentOffHandDamage = itemboxreturn[2]; }
else if (where2use == "Head") { sumosEquipmentHeadId = itemboxreturn[0]; sumosEquipmentHeadCount = itemboxreturn[1]; sumosEquipmentHeadDamage = itemboxreturn[2]; }
else if (where2use == "Chest") { sumosEquipmentChestId = itemboxreturn[0]; sumosEquipmentChestCount = itemboxreturn[1]; sumosEquipmentChestDamage = itemboxreturn[2]; }
else if (where2use == "Leg") { sumosEquipmentLegId = itemboxreturn[0]; sumosEquipmentLegCount = itemboxreturn[1]; sumosEquipmentLegDamage = itemboxreturn[2]; }
else if (where2use == "Boot") { sumosEquipmentBootId = itemboxreturn[0]; sumosEquipmentBootCount = itemboxreturn[1]; sumosEquipmentBootDamage = itemboxreturn[2]; }
else if (where2use == "Item") { }
string[] remeta = { id.ToString(), count.ToString(), damage.ToString(), meta };
return remeta;
}
示例5: attrBtn_Click
private void attrBtn_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[4] == "Unbreakable:1")
{
tabRItemUnbreaking.IsChecked = true;
}
int[] temp2 = itembox.returnStrAdver();
if (temp2[0] != 0)
{
tabRItemItem.SelectedIndex = temp2[0];
}
tabRItemCount.Value = temp2[1];
tabRItemMeta.Value = temp2[2];
tabRItemHide.SelectedIndex = temp2[3];
enchantStrBox.Text = globalEnchString;
NLStrBox.Text = globalNLString;
AttrStrBox.Text = globalAttrString;
}
示例6: bHEShowItem_Click
private void bHEShowItem_Click(object sender, RoutedEventArgs e)
{
AllSelData asd = new AllSelData();
Item itembox = new Item();
itembox.ShowDialog();
int[] temp1 = itembox.returnStrAdver();
string[] temp2 = itembox.returnStr();
string strHead = "";
string str = "tag:{" + temp2[0] + "," + temp2[1] + "," + temp2[2] + "," + temp2[4] + "," + temp2[5] + "," + temp2[8] + "," + temp2[9] + "}}";
for (int i = 0; i < 3; i++)
{
str = str.Replace(",,", ",");
}
if (rbBook.IsChecked.Value) { str = str.Replace("\"", "\\\\\\\""); strHead = "{id:\\\\\\\"" + asd.getItem(temp1[0]) + "\\\\\\\",Count:" + temp1[1] + "b,Damage:" + temp1[2] + "s,"; } else { str = str.Replace("\"", "\\\""); strHead = "{id:\\\"" + asd.getItem(temp1[0]) + "\\\",Count:" + temp1[1] + "b,Damage:" + temp1[2] + "s,"; }
tHEShowItem.Text = strHead + str;
}
示例7: backItemCom
private string backItemCom(ComboBox needChooseIndexComboBox, int whichIndex)
{
string whichItems = "";
string globalEnchString = "";
string globalNLString = "";
string globalAttrString = "";
string globalUnbreaking = "";
string globalHideflag = "";
int globalItemSel = 0;
int globalItemCount = 0;
int globalItemMeta = 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[4] != "")
{
globalUnbreaking = tempa[4];
}
if (tempa[5] != "")
{
globalHideflag = tempa[5];
}
if (tempb[0] != 0)
{
globalItemSel = tempb[0];
}
globalItemCount = tempb[1];
globalItemMeta = tempb[2];
//
AllSelData asd = new AllSelData();
needChooseIndexComboBox.SelectedIndex = globalItemSel;
if (globalItemSel != 0)
{
int index = whichIndex - 1;
whichItems = "" + index + ":{Slot:" + index + "b,id:\"" + asd.getItem(globalItemSel) + "\",Count:" + globalItemCount + "b,Damage:" + globalItemMeta + "s";
if (globalEnchString != "" || globalNLString != "" || globalAttrString != "" || globalUnbreaking != "" || globalHideflag != "")
{
whichItems += ",tag:{";
if (globalEnchString != "")
{
whichItems += globalEnchString + ",";
}
if (globalNLString != "")
{
whichItems += globalNLString + ",";
}
if (globalAttrString != "")
{
whichItems += globalAttrString + ",";
}
if (globalUnbreaking != "")
{
whichItems += globalUnbreaking + ",";
}
if (globalHideflag != "")
{
whichItems += globalHideflag + ",";
}
if (globalEnchString != "" || globalNLString != "" || globalAttrString != "" || globalUnbreaking != "" || globalHideflag != "")
{
whichItems = whichItems.Remove(whichItems.Count() - 1, 1);
}
whichItems += "}}";
}
else
{
whichItems += "}";
}
}
else
{
whichItems = "";
}
return whichItems;
}