Beispiel #1
0
    /// <summary>
    /// Manages the lists and summation updates that happen when a vegetable
    /// is added to the list. This method is responsible for calling other
    /// methods that calculate data that it then uses for maintanence and
    /// display purposes.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void addButton_Click(object sender, EventArgs e)
    {
        int total = 0;

        tempVegetable.manageVegetableList(vegetables, this.vegetableList.SelectedValue, int.Parse(this.quantityInput.Text));
        tempVegetable.manageVegetableListBox(vegetables, this.vegetableListBox);
        total          += tempVegetable.handleBeansAndSquash(vegetables);
        total           = tempVegetable.addValues(vegetables, total);
        this.total.Text = total.ToString( ) + " sqft. are needed for this garden.";
    }