private void CheckCurrentState() { if (currentTask == null) { currentTask = new BaseTask(); currentTask.State = TaskState.Finish; } else if (currentTask.State == TaskState.NoStart) { currentTask.Init(); StartTask(); } StartEvent(); }