private void DeleteCustumCi(CustumCiInfo info) { Dispatcher.Invoke(new Action(() => { try { //调用接口删除数据 Task task = new Task(() => { EventAggregatorRepository.EventAggregator.GetEvent <SettingWindowBusyIndicatorEvent>().Publish(new AppBusyIndicator { IsBusy = true }); try { bool result = false; APIService serviceApi = new APIService(); result = serviceApi.DeleteCustumCiTiaoByToken(UtilSystemVar.UserToken, info.ID); if (result) { EventAggregatorRepository.EventAggregator.GetEvent <GetWordsEvent>().Publish(true); Dispatcher.Invoke(new Action(() => { //删除数据 viewModel.CustumCiInfoList.Remove(info); })); ShowTipsInfo("删除自建词条成功"); } else { ShowTipsInfo("删除自建词条失败"); } } catch (Exception ex) { } EventAggregatorRepository.EventAggregator.GetEvent <SettingWindowBusyIndicatorEvent>().Publish(new AppBusyIndicator { IsBusy = false }); }); task.Start(); } catch (Exception ex) { } })); }