Пример #1
0
        private void DistributeFromDFS2()
        {
            ReClaimIntakes();
            List <IIntake> IntakesToKeep = new List <IIntake>();

            foreach (IIntake I in Intakes)
            {
                int col = _gridCodes.GetColumnIndex(I.well.X);
                int row = _gridCodes.GetRowIndex(I.well.X);

                if (col >= 0 & row >= 0)
                {
                    if (_gridCodes.GetData(0, 1)[row, col] != _gridCodes.DeleteValue)
                    {
                        IntakesToKeep.Add(I);
                        Intakes.Remove(I);
                    }
                }
            }
            MoveIntakes();
            foreach (IIntake I in IntakesToKeep)
            {
                Intakes.Add(I);
            }
        }
Пример #2
0
        private void ReClaimIntakes()
        {
            Layer ToMoveFrom;

            if (_moveUp)
            {
                ToMoveFrom = _above;
            }
            else
            {
                ToMoveFrom = _below;
            }

            foreach (IIntake I in IntakesMoved)
            {
                Intakes.Add(I);
                ToMoveFrom.Intakes.Remove(I);
            }
            IntakesMoved.Clear();
        }