示例#1
0
        /// <summary>
        /// click event for food log button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFoodLog_Click(object sender, EventArgs e)
        {
            //call form's constructor and assign variable
            MyFoodItemForm foodLog = new MyFoodItemForm();

            //display Food Log form
            foodLog.ShowDialog();
        }
示例#2
0
        /// <summary>
        /// click event to add a new food item
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddFoodItem_Click(object sender, EventArgs e)
        {
            //call form's constructor and assign variable
            MyFoodItemForm addFoodItem = new MyFoodItemForm();

            //display Food Log form
            addFoodItem.ShowDialog();

            //clear list box to make room for new list
            lstBoxFoodItems.Items.Clear();

            //call loadFoods method again to refesh list box
            LoadFoods();
        }
示例#3
0
 /// <summary>
 /// click event for food log button
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnFoodLog_Click(object sender, EventArgs e)
 {
     //call form's constructor and assign variable
     MyFoodItemForm foodLog = new MyFoodItemForm();
     //display Food Log form
     foodLog.ShowDialog();
 }
示例#4
0
        /// <summary>
        /// click event to add a new food item
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddFoodItem_Click(object sender, EventArgs e)
        {
            //call form's constructor and assign variable
            MyFoodItemForm addFoodItem = new MyFoodItemForm();
            //display Food Log form
            addFoodItem.ShowDialog();

            //clear list box to make room for new list
            lstBoxFoodItems.Items.Clear();

            //call loadFoods method again to refesh list box
            LoadFoods();
        }