/// <summary> /// 获取Capture(获取拍摄数据)处理结果 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnCaptureResult_Click(object sender, EventArgs e) { try { var tasks = new List <Task>(); foreach (var iixServer in Global.ListIIXSerevr) { if (iixServer.IsEnable == false) { continue; } tasks.Add(Task.Factory.StartNew(() => { PgSelectCode pg = iixServer.SvrType == SvrType.Left ? PgSelectCode.Primary : PgSelectCode.Secondary; IIXExecute.GetCaptureResult(iixServer, pg); })); } Task.WaitAll(tasks.ToArray()); } catch (Exception ex) { Log.WriterExceptionLog(ex.ToString()); } }