Example #1
0
 /// <summary>
 /// Achar o tipo de registro de acordo com o tipo de linha
 /// </summary>
 protected bool FindReg(ref IReg reg, string cLine)
 {
     if (reg == null || !LastRegType.layout.IsThis(cLine))
     {
         foreach (LayoutType lt in type)
         {
             if (lt.layout.IsThis(cLine))
             {
                 // Define o ultimo tipo, como o atual encontrado
                 LastRegType = lt;
                 reg         = (IReg)Activator.CreateInstance(LastRegType.reg);
                 return(true);
             }
         }
         // Não Achou
         return(false);
     }
     reg = reg.Copy();
     // É igual ao ultimo tipo (LastRegType)
     return(true);
 }