Exemple #1
0
        // 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"));
            }
        }
Exemple #2
0
 public XRayController(ApplicationDbContext applicationDb, IPathProvider ipathProvider)
 {
     db           = applicationDb;
     pythonCaller = PythonCaller.getPythonCaller();
     pathProvider = ipathProvider;
 }
Exemple #3
0
 public XRayController()
 {
     db           = ApplicationDbContext.Create();
     pythonCaller = PythonCaller.getPythonCaller();
     pathProvider = new ServerPathProvider();
 }