Beispiel #1
0
        /*
        public String FindOptimalSizeOfMods(int numberOfMods)
        {
            float optimalModSize = 0;
            float remainingWallLength = ProposedLength;
            int noDecimalModSize;

            remainingWallLength -= TotalCornerLength;
            remainingWallLength -= TotalReceiverLength;

            remainingWallLength -= (Constants.DEFAULT_FILLER * 2);

            optimalModSize = remainingWallLength / numberOfMods;
            noDecimalModSize = (int)optimalModSize;

            float decimalRound = optimalModSize - noDecimalModSize;
            float addedToFiller = decimalRound * numberOfMods;

            if (decimalRound > 0.875f)
            {
                decimalRound = 0.875f;
            }
            else if (decimalRound > 0.75f)
            {
                decimalRound = 0.75f;
            }
            else if (decimalRound > 0.625f)
            {
                decimalRound = 0.625f;
            }
            else if (decimalRound > 0.5f)
            {
                decimalRound = 0.5f;
            }
            else if (decimalRound > 0.375f)
            {
                decimalRound = 0.375f;
            }
            else if (decimalRound > 0.25f)
            {
                decimalRound = 0.25f;
            }
            else
            {
                decimalRound = 0;
            }

            optimalModSize = noDecimalModSize + decimalRound;

            return "Suggested " + numberOfMods + " mods at " + optimalModSize + " inches, adding " + addedToFiller/2 + " inches to both fillers.";
        }
        */
        public void addToItemList(LinearItem anObject)
        {
            linearItems.Add(anObject);
        }
Beispiel #2
0
        /*
         * public String FindOptimalSizeOfMods(int numberOfMods)
         * {
         *  float optimalModSize = 0;
         *  float remainingWallLength = ProposedLength;
         *  int noDecimalModSize;
         *
         *  remainingWallLength -= TotalCornerLength;
         *  remainingWallLength -= TotalReceiverLength;
         *
         *  remainingWallLength -= (Constants.DEFAULT_FILLER * 2);
         *
         *  optimalModSize = remainingWallLength / numberOfMods;
         *  noDecimalModSize = (int)optimalModSize;
         *
         *  float decimalRound = optimalModSize - noDecimalModSize;
         *  float addedToFiller = decimalRound * numberOfMods;
         *
         *  if (decimalRound > 0.875f)
         *  {
         *      decimalRound = 0.875f;
         *  }
         *  else if (decimalRound > 0.75f)
         *  {
         *      decimalRound = 0.75f;
         *  }
         *  else if (decimalRound > 0.625f)
         *  {
         *      decimalRound = 0.625f;
         *  }
         *  else if (decimalRound > 0.5f)
         *  {
         *      decimalRound = 0.5f;
         *  }
         *  else if (decimalRound > 0.375f)
         *  {
         *      decimalRound = 0.375f;
         *  }
         *  else if (decimalRound > 0.25f)
         *  {
         *      decimalRound = 0.25f;
         *  }
         *  else
         *  {
         *      decimalRound = 0;
         *  }
         *
         *  optimalModSize = noDecimalModSize + decimalRound;
         *
         *  return "Suggested " + numberOfMods + " mods at " + optimalModSize + " inches, adding " + addedToFiller/2 + " inches to both fillers.";
         * }
         */

        public void addToItemList(LinearItem anObject)
        {
            linearItems.Add(anObject);
        }