/// <summary> /// Конструктор без параметор. /// </summary> public Panel_AddRecipe() { InitializeComponent(); controllerRecipe = new ControllerRecipe(); controllerRecipe.recipes = SerializationOnJson.RecipeDeserializationJson(); SetUpList(); }
public ControllerManagerResponse ProgramController(ControllerRecipe recipe) { if (this._controller.IsOpen) { var buffer = recipe.GetBuffer(); try { this._controller.Write(buffer); return(new ControllerManagerResponse(true, "Success: Command Sent")); } catch { return(new ControllerManagerResponse(false, "Error: Could not send command, please try reconnecting board")); } } return(new ControllerManagerResponse(false, "Error: Controller not connected")); }