/// <summary> /// 点亮屏幕 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPanelOn_Click(object sender, EventArgs e) { try { var tasks = new List <Task>(); foreach (var iixServer in Global.ListIIXSerevr) { if (iixServer.IsEnable == false) { continue; } if (iixServer.SvrType == SvrType.Right) { tasks.Add(Task.Factory.StartNew(() => { IIXExecute.PanelOn(iixServer, PgSelectCode.Primary); })); } } Task.WaitAll(tasks.ToArray()); } catch (Exception ex) { Log.WriterExceptionLog(ex.ToString()); } }