Esempio n. 1
0
        //public override Task OnReconnected()
        //{
        //    // Add your own code here.
        //    // For example: in a chat application, you might have marked the
        //    // user as offline after a period of inactivity; in that case
        //    // mark the user as online again.
        //    return base.OnReconnected();
        //}

        public ChartHub(ChartService chartService, DummyPlcService dummyPlcService)
        {
            _chartService    = chartService;
            _dummyPlcService = dummyPlcService;
        }
 public ActionResult Start(int? id)
 {
     var service = new DummyPlcService();
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     T_Plc t_Plc = db.T_Plc.Find(id);
     if (t_Plc == null)
     {
         return HttpNotFound();
     }
     service.StartDummyPlc(t_Plc.Id);
        // _DummyService.StartDummyPlc(t_Plc.Id);
     return RedirectToAction("Index");
 }
 //public override Task OnReconnected()
 //{
 //    // Add your own code here.
 //    // For example: in a chat application, you might have marked the
 //    // user as offline after a period of inactivity; in that case
 //    // mark the user as online again.
 //    return base.OnReconnected();
 //}
 public ChartHub(ChartService chartService, DummyPlcService dummyPlcService)
 {
     _chartService = chartService;
     _dummyPlcService = dummyPlcService;
 }