Example #1
0
 void DetectRingCtrlsLst(ref List <List <CellObjCtrl> > rings)
 {
     foreach (CellObjCtrl ctrl in _ctrlLst)
     {
         bool bChecked = _ctrls [ctrl];
         if (bChecked)
         {
             continue;
         }
         List <CellObjCtrl> ringObjs  = new List <CellObjCtrl> ();
         List <CellObjCtrl> chainObjs = new List <CellObjCtrl> ();
         bool bDetected = CellObjCtrlUtils.DetectNPCCloseChainFrom(ctrl, ref ringObjs, ref chainObjs);
         bDetected = (bDetected && (ringObjs.Count > 2));
         // tag each ctrl Checked in chainObjs
         foreach (CellObjCtrl rctrl in chainObjs)
         {
             _ctrls [rctrl] = true;
         }
         if (bDetected)
         {
             CellObjCtrlUtils.ReorderRing(ref ringObjs);
             rings.Add(ringObjs);
         }
         _ctrls [ctrl] = true;
     }
 }