Esempio n. 1
0
        public override bool Run(bool bAppend = false)
        {
            if (!System.IO.File.Exists(FilePath))
            {
                return(false);
            }

            if (StrList == null)
            {
                StrList = new List <String>();
            }
            else
            {
                StrList.Clear();
            }

            using (StreamReader reader = System.IO.File.OpenText(FilePath))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    StrList.Add(line);
                }
            }
            return(true);
        }
Esempio n. 2
0
 static public int Clear(IntPtr l)
 {
     try {
         StrList self = (StrList)checkSelf(l);
         self.Clear();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }