Ejemplo n.º 1
0
        private void taskFunc()
        {
            threadNewTask = new ExThread(newTaskFunc);
            threadNewTask.Start();

            threadAssignTask = new ExThread(assignTaskFunc);
            threadAssignTask.Start();

            threadUpadteTask = new ExThread(updateTaskFunc);
            threadUpadteTask.Start();

            //任务调度已经完全开启
            TaskState = true;

            //启动数据同步
            DataSync.Start();

            while (this.IsHandleCreated && this.IsDisposed == false)
            {
                //更新MES状态
                UpdateMES();

                Thread.Sleep(Parameter.taskFuncTime);
            }
        }
Ejemplo n.º 2
0
 //结束任务
 public void TaskStop()
 {
     if (TaskState)
     {
         threadNewTask.Stop();
         threadUpadteTask.Stop();
         threadAssignTask.Stop();
         DataSync.Stop();
     }
 }