コード例 #1
0
        //will initialize begining valuses of GUI
        public void InitializeGUI()
        {
            if (m_recipe.IngredientsArray == null)
            {
                m_recipe.IngredientsArray = new string[m_recipe.MaxNumOfIngrediens];
            }

            labelNo.Text = m_recipe.GetCurrentNumOfIngrediens().ToString();
            textBoxPutIngredient.Text = string.Empty;
        }
コード例 #2
0
 //will print all Ingrediens
 public void showIngredients(Recipe recipe)
 {
     m_recipe         = recipe;
     ingredientsArray = m_recipe.IngredientsArray;
     for (int i = 0; i < ingredientsArray.Length; i++)
     {
         if (ingredientsArray[i] != string.Empty)
         {
             listBoxListOfIngrediens.Items.Add(ingredientsArray[i]);
         }
     }
     labelNo.Text = m_recipe.GetCurrentNumOfIngrediens().ToString();
 }