public JsonResult ReadTimeToBuffer() { RollerTimer.GetInstance().ReadAllTimeBuffer(); string str = "已读取时间至内存!"; return(Json(str, JsonRequestBehavior.AllowGet)); }
// GET: ControlBlock public ActionResult Index() { ControlBlockViewModel cbvm = new ControlBlockViewModel() { rollerbasestations = baserepo.RollerBaseStations.Include(x => x.ForcerCfg).Include(x => x.TimerCfg), td = RollerTimer.GetInstance().ReadAllRollerTime() }; return(View(cbvm)); }
public JsonResult CloseTimePort() { Task task = new Task(() => { RollerTimer.GetInstance().CloseAllTimeSwitch(); }); task.Start(); string str = "已关闭所有计数端口!"; return(Json(str, JsonRequestBehavior.AllowGet)); }