// POST: RemoteCommand/Active/5 public ActionResult Activate(int id) { try { var remoteCommand = RemoteCommandMockRepository.Singleton.GetRemoteCommandById(id); string binaryCode = ToBinaryCode(remoteCommand.SignalCode); var pythonCaller = new PythonCaller(); var output = pythonCaller.Execute(binaryCode); Console.WriteLine(output); return(RedirectToAction(nameof(Index))); } catch { return(View("Error")); } }
public XRayController(ApplicationDbContext applicationDb, IPathProvider ipathProvider) { db = applicationDb; pythonCaller = PythonCaller.getPythonCaller(); pathProvider = ipathProvider; }
public XRayController() { db = ApplicationDbContext.Create(); pythonCaller = PythonCaller.getPythonCaller(); pathProvider = new ServerPathProvider(); }