Exemplo n.º 1
0
 void numericUpDownRank_ValueChanged(object sender, EventArgs e)
 {
     if (listBoxRank.SelectedItem != null)
     {
         RankItem.Rank rank = Economy.Ranks.FindRank(listBoxRank.SelectedItem.ToString());
         if (rank != null)
         {
             rank.price = (int)numericUpDownRank.Value;
         }
     }
 }
Exemplo n.º 2
0
 void listBoxRank_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (listBoxRank.SelectedItem == null)
     {
         numericUpDownRank.Value = 0;
     }
     else
     {
         RankItem.Rank rank = Economy.Ranks.FindRank(listBoxRank.SelectedItem.ToString());
         numericUpDownRank.Value = rank != null ? rank.price : 0;
     }
 }