Task Use

Task task = new Task(() =>
{
flightMdls = (List<FlightAirLineModelExModel>)ScreenManager.ShowWaitForm2(this.ParentForm, GetAirlineData, "");
});
task.Start();
task.ContinueWith((t) =>
{
this.Invoke((EventHandler)delegate
{
BandTree(flightMdls);
});
});

Guess you like

Origin www.cnblogs.com/houzf/p/12060178.html