Example #1
0
        public OcrCharacter GetOcrCharacter(string text, bool addIfNotExists)
        {
            foreach (var ocrCharacter in OcrCharacters)
            {
                if (ocrCharacter.Text == text)
                    return ocrCharacter;
            }

            if (addIfNotExists)
            {
                OcrCharacter ch = new OcrCharacter(text);
                OcrCharacters.Add(ch);
                return ch;
            }
            return null;
        }
Example #2
0
        public OcrCharacter GetOcrCharacter(string text, bool addIfNotExists)
        {
            foreach (var ocrCharacter in OcrCharacters)
            {
                if (ocrCharacter.Text == text)
                {
                    return(ocrCharacter);
                }
            }

            if (addIfNotExists)
            {
                OcrCharacter ch = new OcrCharacter(text);
                OcrCharacters.Add(ch);
                return(ch);
            }
            return(null);
        }