Recipe load from Controller
Posted: Fri May 22, 2015 6:49 pm
Hi Mark
I worked on the code that the controller to trigger automatic download of recipe instead of trigger the recipe load through button. However, it does not seem to call out the recipe. Can you help to see what wrong with the code below?
public partial class Screen1
{
List<string> listRecipeNames = new List<string>();
void Button_TestRecipe_Click(System.Object sender, System.EventArgs e)
{
listRecipeNames.Clear();
Globals.RecipeUtility.GetRecipesNamesInTable("Recipe1", ref listRecipeNames);
if (listRecipeNames.Contains(Globals.Tags.RecipeName.Value.ToString()))
{
Globals.Tags.RecipeExists.SetTag();
Globals.Recipe1.LoadRecipe(Globals.Tags.RecipeName.Value);
}
else
{
Globals.Tags.RecipeExists.ResetTag();
}
}
I worked on the code that the controller to trigger automatic download of recipe instead of trigger the recipe load through button. However, it does not seem to call out the recipe. Can you help to see what wrong with the code below?
public partial class Screen1
{
List<string> listRecipeNames = new List<string>();
void Button_TestRecipe_Click(System.Object sender, System.EventArgs e)
{
listRecipeNames.Clear();
Globals.RecipeUtility.GetRecipesNamesInTable("Recipe1", ref listRecipeNames);
if (listRecipeNames.Contains(Globals.Tags.RecipeName.Value.ToString()))
{
Globals.Tags.RecipeExists.SetTag();
Globals.Recipe1.LoadRecipe(Globals.Tags.RecipeName.Value);
}
else
{
Globals.Tags.RecipeExists.ResetTag();
}
}