为了账号安全,请及时绑定邮箱和手机立即绑定

求助大神——WPF多线程

求助大神——WPF多线程

拉丁的传说 2018-07-24 04:09:03
 MyDataSource.Clear();            Task.Factory.StartNew(() =>            {                                GridViewIsBusy = true;                            var response = _IndoorSampleCheckHttpProxy.GetSamplesIndoorStationsByStationQueryInformation(_StationQueryInformation);                foreach (var item in response)                {                    item.Number = index.ToString();                    if (item.AjustNumber != null)                    {                        if (item.AjustNumber.Contains(item.OldBoxNumber))                            item.Flag = true;                    }                    index++;                }                Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Send,new Action(delegate()                 {                    MyDataSource.AddRange(response);                                    }));                            GridViewIsBusy = false;            });
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 742 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信