Пример #1
0
 public static SubWork GetSubWork()
 {
     if (subwork == null)
     {
         subwork = new SubWork();
     }
     return(subwork);
 }
Пример #2
0
 // subwork.stateset(state, ref1, ref2)
 // 设置系统相关状态,用于NovoExpress状态的显示
 // state: 主状态,表示系统处于哪个流程,取值为`WORK_STARTUP`、`WORK_IDLE`、
 // `WORK_MEASURE`、`WORK_MAINTAIN`、`WORK_ERROR`、`WORK_SLEEP`、`WORK_SHUTDOWN`、`WORK_INITPRIMING`、
 // `WORK_DRAIN`、`WORK_SLEEPENTER`、`WORK_SLEEPEXIT`、`WORK_DECONTAMINATION`
 // ref1: 表示一级子状态
 // ref2: 表示二级子状态
 public void stateSet(int state, int ref1, int ref2)
 {
     fromLua.State = state;
     fromLua.Ref1  = ref1;
     fromLua.Ref2  = ref2;
     if (state == (int)WorkState.WORK_IDLE)
     {
         SubWork.GetSubWork().workQuit = WOEK_QUIT.WORK_QUIT_Wait;
     }
     Console.WriteLine(string.Format("state to: {0}, sub state: {1}", fromLua.State, fromLua.Ref1));
 }