Exemplo n.º 1
0
 public void NactiSouborPoRadcich()
 {
     if (ZacatekNacitani != null)
     {
         ZacatekNacitani(this);
     }
     using (StreamReader sr = new StreamReader(msbSoubor.CelaCesta, mcsnNastaveni.Kodovani)) {
         string sRadek = null;
         int    i      = 0;
         while ((sRadek = sr.ReadLine()) != null)
         {
             RadekEventArgs rea = new RadekEventArgs(sRadek, ++i);
             if (mcsnNastaveni.VynechatPrazdneRadky)
             {
                 if (sRadek.Length > 0)
                 {
                     NactenyRadek(this, rea);
                 }
                 else
                 {
                     i--;
                 }
             }
             else
             {
                 NactenyRadek(this, rea);
             }
         }
     }
     if (KonecNacitani != null)
     {
         KonecNacitani(this);
     }
 }
Exemplo n.º 2
0
        void CteckaZaznamu_NactenyRadek(object sender, RadekEventArgs ev)
        {
            T t = new T();

            t.NactiZaznam(ev.Text);
            glstZaznamy.Add(t);
        }
Exemplo n.º 3
0
 void CteckaSouboru_NactenyRadek(object sender, RadekEventArgs ev)
 {
     mglsRadky.Add(ev.Text);
 }