private async System.Threading.Tasks.Task Play() { var api = new ApiInvoker(); ctrTaskTable.PlayMessage("加载数据中..."); var tasks = await api.GetTasks(); if (tasks.Count > 0) { foreach (var task in tasks) { var subTasks = await api.GetSubTasks(task.ID); var models = BuildTaskViewModels(task, subTasks); foreach (var item in models) { if (item.Children.Count == 0) { continue; } ctrTaskTable.UpdateModel(item); ctrTaskTable.Play(); await ctrTaskTable.Await(Config.PlaySeconds); ctrTaskTable.Stop(); } } } else { ctrTaskTable.PlayMessage("没有未完成任务"); await ctrTaskTable.Await(1); } }