Пример #1
0
 private void IngrediantTBox_PreviewMouseDown(object sender, MouseButtonEventArgs e)
 {
     if ((e.XButton1 == Mouse.MiddleButton) && !ingCleared)
     {
         IngrediantTBox.Clear();
         ingCleared = true;
     }
 }
Пример #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();
            }
        }