public void StartTask(YZXTask task) { switch (task.RunType) { case YZXTaskRunType.TIMER: StartTimerTask(task); break; case YZXTaskRunType.WaitForFinish: task.InitTask(); StartWaitForFinishTask(task); break; case YZXTaskRunType.CONTINUE: task.InitTask(); task.StartThread(); break; } }