Example #1
0
        public void CalculateBoards()
        {
            for (int i = 0; i < boardList.Count; i++)
            {
                Board board = boardList[i];

                int      width    = board.Width;
                int      length   = board.Length;
                int      quantity = board.Quantity;
                Surfaces surface  = board.Surface;

                if (board.Extension)
                {
                    length    = board.Length / 2;
                    quantity *= 2;
                }

                length += 10;
                width  += 10;

                Plate plate = new Plate(length, width, surface);
                plate.Quantity = quantity;
                AddPlate(plate);
            }
        }
Example #2
0
 public void AddPlate(Plate plate)
 {
     if (plateList.Exists(x => x.Equals(plate)))
     {
         plateList.Find(x => x.Equals(plate)).Quantity += plate.Quantity;
     }
     else
     {
         plateList.Add(plate);
     }
 }