Ejemplo n.º 1
0
        public JsonResult ReadTimeToBuffer()
        {
            RollerTimer.GetInstance().ReadAllTimeBuffer();
            string str = "已读取时间至内存!";

            return(Json(str, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        // 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));
        }
Ejemplo n.º 3
0
        public JsonResult CloseTimePort()
        {
            Task task = new Task(() => {
                RollerTimer.GetInstance().CloseAllTimeSwitch();
            });

            task.Start();
            string str = "已关闭所有计数端口!";

            return(Json(str, JsonRequestBehavior.AllowGet));
        }