private string _generalLogicResult(UBasCov2 BasCov) { try{ var BaseSetLst = BasCov.BaseSetLst; //BaseSet list var CoverSetLst = BasCov.CoverSetLst; //CoverSet list Bit81 Q = new Bit81(); foreach (var P in CoverSetLst) { Q |= P.rcnBit.CompressToHitCells(); } foreach (var UC in Q.IEGetRC().Select(rc => pBDL[rc])) { UC.SetCellBgColor(SolBkCr2); } for (int rc = 0; rc < 81; rc++) { int noB = BasCov.HB981.IsHit(rc); if (noB > 0) { pBDL[rc].SetNoBBgColor(noB, AttCr, SolBkCr); } } string msg = "\r BaseSet: "; string msgB = BaseSetLst.Aggregate("", (Q, P) => Q + $" {P.ToAppearance()}"); msg += msgB.ToString_SameHouseComp1(); msg += "\r CoverSet: "; string msgC = CoverSetLst.Aggregate("", (Q, P) => Q + $" {P.ToAppearance()}"); msg += msgC.ToString_SameHouseComp1(); string st = $"GeneralLogic size:{BasCov.sz} rank:{BasCov.rnk}"; Result = st; msg += $"\rChkBas:{ChkBas4}/{ChkBas1} ChkCov:{ChkCov2}/{ChkCov1}"; ResultLong = st + "\r " + msg; return(st + "\r" + msg); } catch (Exception ex) { WriteLine(ex.Message + "\r" + ex.StackTrace); } return(""); }
private void _generalLogicResult(UBasCov UBCc) { try{ Bit81 Q = new Bit81(); foreach (var P in UBCc.covUGLs) { Q |= P.rcbn2.CompressToHitCells(); } foreach (var UC in Q.IEGetRC().Select(rc => pBDL[rc])) { UC.SetCellBgColor(SolBkCr2); } for (int rc = 0; rc < 81; rc++) { int noB = UBCc.HB981.IsHit(rc); if (noB > 0) { pBDL[rc].SetNoBBgColor(noB, AttCr, SolBkCr); } } string msg = "\r BaseSet: "; string msgB = ""; foreach (var P in UBCc.basUGLs) { if (P.rcBit81 is Bit81) { msgB += P.tfx.tfxToString() + $"#{(P.rcBit81.no+1)} "; } else { msgB += P.UC.rc.ToRCString() + " "; } } msg += ToString_SameHouseComp1(msgB); msg += "\r CoverSet: "; string msgC = ""; foreach (var P in UBCc.covUGLs) { if (P.rcBit81 is Bit81) { msgC += P.tfx.tfxToString() + $"#{(P.rcBit81.no+1)} "; } else { msgC += P.UC.rc.ToRCString() + " "; } } msg += ToString_SameHouseComp1(msgC); string st = $"GeneralLogic N:{UBCc.sz} rank:{UBCc.rnk}"; Result = st; msg += $"\r\r ChkBas:{ChkBas4}/{ChkBas1} ChkCov:{ChkCov2}/{ChkCov1}"; ResultLong = st + msg; } catch (Exception ex) { WriteLine(ex.Message); WriteLine(ex.StackTrace); } }