private void HandleCheckResult(bool isCheckOk, IEnumerable <List <string> > shortCircuitList, IEnumerable <string[]> openCircuitList) { var shortCircuit = ""; var openCircuit = ""; if (isCheckOk) { CommonCheck.UpdateBarList(Cable.CableName, this, _barDt); CpldControl.Bartend.BartendControl.PrintBar(Cable.CableName); CommonCheck.AddCheckResult(this, _barDt, Cable.CableName, "OK", shortCircuit, openCircuit, User.UserName); Cable.Settings.OkTime++; CommonControl.SendOkRelay(1000); } else { foreach (var tmpList in shortCircuitList) { var scTmp = ""; foreach (var tmp in tmpList) { if (_phyAddrMapToDot.ContainsKey(tmp)) { scTmp += ((Dot)_phyAddrMapToDot[tmp]).Info.Name + "-"; } else { scTmp += tmp + "(未标定)-"; } } shortCircuit += scTmp.Remove(scTmp.Length - 1) + "; "; } openCircuit = openCircuitList.Aggregate(openCircuit, (current, arrTmp) => current + (arrTmp[0] + "/" + arrTmp[1] + "; ")); CommonCheck.AddCheckResult(this, _barDt, Cable.CableName, "NG", shortCircuit, openCircuit, User.UserName); //add check result to db Cable.Settings.NgTime++; } LbOkTime.Content = Cable.Settings.OkTime; LbNgTime.Content = Cable.Settings.NgTime; InfoBox.PlaySound(isCheckOk); new ResultPopUp(isCheckOk, Cable.Settings.OkAutoRelease, Cable.Settings.NgAutoRelease).ShowDialog(); }