Ejemplo n.º 1
0
 public RunReport(string path)
 {
     this.logFolderPath = path;
     reportFolderName = path + "/Reports ";
     allLogFileNames = new GenericArrayList<string>();
     allLogLines = new GenericArrayList<LogLine>();
 }
Ejemplo n.º 2
0
 public static GenericArrayList<LogLine> readAllLogLines(string fileName)
 {
     GenericArrayList<LogLine> logLines = new GenericArrayList<LogLine>();
     StreamReader reader = new StreamReader(fileName);
     string line = "";
     while ((line = reader.ReadLine()) != null)
     {
         if (line.Trim().Length == 0)
             continue;
         if(!line.Contains("</tr>"))
         {
             string nextLine = reader.ReadLine();
             while (nextLine != null && (nextLine.Contains("</tr>") != true))
             {
                 line += nextLine;
                 nextLine = reader.ReadLine();
                 if (nextLine == null)
                 {
                     break;
                 }
             }
         }
         if(line.Trim().Length > 0)
             logLines.add(LineParser.parseLine(line));
     }
     return logLines;
 }
Ejemplo n.º 3
0
        public LogcatManager()
        {
            Slots = new GenericArrayList<FilteredLogSlot>(10);
            GeneralEntries = new EntryList();

            LogcatProcess = new ProcessObject("logcat");

            LogcatProcess.OnLineOutputReceive += new ProcessObject.ConsoleLineOutputHandler(LogcatProcess_OnLineOutputReceive);
        }
Ejemplo n.º 4
0
        /*
         *      This method is to get all the *.log file name list in a folder and also in its sub-lofders
         *      recursively.
         */
        private void getAllLogFiles(DirectoryInfo directoryInfo, string searchPattern, ref GenericArrayList<string> logFiles)
        {
            foreach (FileInfo fi in directoryInfo.GetFiles(searchPattern))
            {
                logFiles.Add(fi.FullName);
            }

            foreach (DirectoryInfo di in directoryInfo.GetDirectories())
            {
                getAllLogFiles(di, searchPattern, ref logFiles);
            }
        }
Ejemplo n.º 5
0
        public static GenericArrayList<string> getAllLines(string fileName)
        {
            GenericArrayList<string> lines = new GenericArrayList<string>();
            
            StreamReader reader = new StreamReader(fileName);
            string line = "";
            while ((line = reader.ReadLine()) != null)
            {
                lines.add(line);
            }

            return lines;
        }
        public static void Main(string[] args)
        {
            //Collections.ArrayList arrList =new Collections.ArrayList();


            ////adding some items
            //arrList.Add(20);
            //arrList.Add(30);
            //arrList.Add(40);
            //arrList.Add(50);
            //arrList.Add("End");

            ////insert item in specific index
            //arrList.Insert(2, 5000);
            //Console.WriteLine("Original Array\n");
            ////print all items
            //arrList.PrintItems();
            //Console.WriteLine("-----------------------------------------------");
            //Console.WriteLine("New Array\n");
            ////remove item at specific index
            //arrList.RemoveAt(5);
            //arrList.ReplaceWith(0,7000);
            ////print all items
            //arrList.PrintItems();
            //Console.WriteLine("-----------------------------------------------");

            //Console.WriteLine($"index of {30} is {arrList.IndexOf(30)}");
            //Console.WriteLine($"index of {50} is {arrList.IndexOf(50)}");
            //Console.WriteLine($"index of End is {arrList.IndexOf("End")}");
            //Console.Read();

            GenericArrayList <int> genericArrayList = new GenericArrayList <int>();

            genericArrayList.Add(1);
            genericArrayList.Add(5);
            genericArrayList.Add(25);

            foreach (int item in genericArrayList)
            {
                Console.WriteLine(item);
            }


            //int sum = genericArrayList.GetItem(0) + genericArrayList.GetItem(1);
            //Console.WriteLine("Sum is {0}",sum);
            Console.Read();
        }
Ejemplo n.º 7
0
 public FilterList()
 {
     Filters = new GenericArrayList<LogFilter>();
 }
Ejemplo n.º 8
0
 public EntryList()
 {
     Entires = new GenericArrayList<LogEntry>();
 }
Ejemplo n.º 9
0
 public frmFilters(List<UserFilterObject> FilterList)
 {
     ToRemove = new GenericArrayList<UserFilterObject>();
     Filters = FilterList;
     InitializeComponent();
 }