Exemplo n.º 1
0
        private string ReplaceAllChar(string text)
        {
            int linePosition = 1;

            KeyTemplateHelper.Clear();
            for (int idx = 0; idx < text.Length; idx++)
            {
                if (text[idx] == '\n')
                {
                    linePosition++;
                }
                else
                {
                    CaractereMorphing current = alphabet.Where(a => a.Caractere == text.ToUpper()[idx]).FirstOrDefault();
                    if (current == null)
                    {
                    }
                    else
                    {
                        KeyTemplateHelper.Append(current.HidenTemplate(cb_caractereCodant.SelectedItem.ToString(), cb_jeudecaracteres.SelectedItem.ToString()).ToString().Split("\n".ToCharArray()), linePosition);
                    }
                    //result.Append(alphabet.Where(a=>a.Caractere == text.ToUpper()[idx]).FirstOrDefault().Template);
                }
            }

            return(KeyTemplateHelper.ToString());
        }