Ejemplo n.º 1
0
        // this is the beginning of the new meal logic

        #endregion
        #region ButtonClearingLogic
        private void MealName_PreviewMouseDown(object sender, MouseButtonEventArgs e)
        {
            if ((e.XButton1 == Mouse.MiddleButton) && !mealCleared)
            {
                MealName.Clear();
                mealCleared = true;
            }
        }
Ejemplo n.º 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {//On "New Meal" button click, pull information and create a meal. also checks that the user has changed the information in the boxes and that it isnt the default message
            if (MealName.Text == "Enter New Meal Title..." || IngrediantTBox.Text == "Enter Ingrediants then '/' then Department ex. (Flour/Grocery), Separate them with a comma ex.(Flour/Grocery, Bread/Bakery)")
            {
                System.Windows.MessageBox.Show("Please Enter Meal Name and Ingredients");
            }
            else
            {
                mealMaker.NewMealCreater(MealName, IngrediantTBox);

                MealName.Clear();
                IngrediantTBox.Clear();
            }
        }