示例#1
0
        internal TextModeDefinitionEntry GetNextValidCharacter(
            string remainingData)
        {
            TextModeDefinitionEntry characterInTable = TextMode.FindCharacterInTable((int)remainingData[0]);

            if (characterInTable != null || remainingData.Length <= 1)
            {
                return(characterInTable);
            }
            remainingData = remainingData.Substring(1);
            return(this.GetNextValidCharacter(remainingData));
        }
示例#2
0
        private static string ValidateText(string text)
        {
            string empty = string.Empty;

            for (int index = 0; index < text.Length; ++index)
            {
                if (TextMode.FindCharacterInTable((int)text[index]) != null)
                {
                    empty += (string)(object)text[index];
                }
            }
            return(empty);
        }
示例#3
0
 internal void PadData(bool shouldApplyNonLatchData)
 {
     if (shouldApplyNonLatchData)
     {
         if (this.CurrentSymbolSubmode != TextSubMode.Punctuation)
         {
             this.formattedDataInt.Add((long)TextMode.FindCharacterInTable(1006).RowIndex);
         }
         else
         {
             this.formattedDataInt.Add((long)TextMode.FindCharacterInTable(1001).RowIndex);
         }
     }
     else
     {
         this.formattedDataInt.Add((long)TextMode.FindCharacterInTable(1005).RowIndex);
     }
 }
示例#4
0
        private static int GetNumberOfCharsAtPosition(string text, int currentPosition)
        {
            int num = 0;

            while (currentPosition <= text.Length - 1 && PDF417.GetNumberOfDigitsAtPosition(text, currentPosition) < 13 && TextMode.FindCharacterInTable((int)text[currentPosition]) != null)
            {
                ++currentPosition;
                ++num;
            }
            return(num);
        }