Esempio n. 1
0
 private void itemComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (itemComboBox.SelectedIndex >= 0)
     {
         textBox2.Text = InventoryFunctions.getItemByName(itemComboBox.SelectedItem.ToString()).value.ToString();
     }
 }
Esempio n. 2
0
        public void populateItems()
        {
            BindingList <Item> itemList = new BindingList <Item>(InventoryFunctions.listRows());
            List <string>      index    = new List <string>();

            for (int i = 0; i < itemList.Count; i++)
            {
                index.Add(itemList[i].name);
            }
            itemComboBox.DataSource = index;
            textBox2.Text           = InventoryFunctions.getItemByName(index[0]).value.ToString();
        }