Advertisement
Drizer

teste

Aug 17th, 2012
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.13 KB | None | 0 0
  1. armas = gcnew List<String^>();
  2.              sWeapon->SelectedIndex = 0;
  3.             for(int i=0; i != sWeapon->Items->Count;i++)
  4.             {
  5.                 String^item=sWeapon->Items[i]->ToString();
  6.                 if (item->Contains("1000"))
  7.                 {
  8.                     array<String^>^ spl = Regex::Split(item, "1000");
  9.                     String^ itemName = spl[0];
  10.                     armas->Add(itemName+"|1000"+spl[1]->Trim());
  11.                 }
  12.                 else if(item->Contains("2000"))
  13.                 {
  14.                     array<String^>^ spl = Regex::Split(item, "2000");
  15.                     String^ itemName = spl[0];
  16.                     armas->Add(itemName+"|2000"+spl[1]->Trim());
  17.                 }
  18.                 else
  19.                 {
  20.                     array<String^>^ spl = Regex::Split(item, "3000");
  21.                     String^ itemName = spl[0];
  22.                     armas->Add(itemName+"|3000"+spl[1]->Trim());
  23.                 };
  24.             }
  25.             for (int i2=0;i2!=armas->Count;i2++)
  26.             {
  27.                 array<String^>^ obj = armas[i2]->Split('|');
  28.                 sWeapon->Items[i2] = obj[0];
  29.             };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement