Esempio n. 1
0
        private void btn_viewbutton_Click(object sender, EventArgs e)
        {
            int bulbindex = lb_bulblist.SelectedIndex;

            if (bulbindex == -1)
            {
                return;
            }
            LightBulb currentBulb = bulbList[bulbindex];
            int       wattage     = currentBulb.getWattage();
            double    cost        = currentBulb.getCost();

            lbl_watts.Text = "" + wattage;
            lbl_cost.Text  = "" + cost;
        }