Exemple #1
0
 public void Write(StreamWriter sw)
 {
     sw.WriteLine(IniSec.makeSec(SecName));
     for (int i = 0; i < n; i++)
     {
         sw.WriteLine(LHS[i] + "=" + RHS[i]);
     }
 }
Exemple #2
0
 public string get(string sec, string key, out bool success)
 {
     success = false;
     for (int i = 0; i < sections.Count; i++)
     {
         if (IniSec.makeSec(sections[i].SecName) == IniSec.makeSec(sec))
         {
             return(sections[i].get(key, out success));
         }
     }
     return("");//else it didn't find it
 }
Exemple #3
0
        public void SetKey(string mainsec, string curremotepre, string v)
        {
            int index = 0;

            for (int i = 0; i < sections.Count; i++)
            {
                if (IniSec.makeSec(sections[i].SecName) == IniSec.makeSec(mainsec))
                {
                    index = i;
                }
            }
            sections[index].Setkey(curremotepre, v);
        }
Exemple #4
0
 public IniSec getSec(string sec)
 {
     for (int i = 0; i < sections.Count; i++)
     {
         if (IniSec.makeSec(sections[i].SecName) == IniSec.makeSec(sec))
         {
             return(sections[i]);
         }
     }
     return(new IniSec("no sec", new string[1] {
         "nadah"
     }));
 }