Exemple #1
0
        //Method to end the most current section
        public static void EndSection()
        {
            FrontEndReport.Add("-----------------------");
            FrontEndReports.Add(FrontEndReport);
            var sectionName = Section.Pop();

            try
            {
                using (var streamWriter = File.AppendText(Folder + "\\" + Filename))
                {
                    //Console.WriteLine(@"Error in reporter" + sectionName);
                    streamWriter.WriteLine("------------- End: " + sectionName + " -------------");
                    streamWriter.WriteLine(" ");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(@"Error in reporter" + ex);
            }
        }
Exemple #2
0
        //Method to write a message to the log or the gui log
        public static void WriteContent(string content, int location)
        {
            try
            {
                switch (location)
                {
                case 0:
                    using (var streamWriter = File.AppendText(Folder + "\\" + Filename))
                    {
                        streamWriter.WriteLine(DateTime.Now + "    " + content);
                    }
                    break;

                case 1:
                    FrontEndReport.Add("     " + content);

                    break;

                case 2:
                    using (var streamWriter = File.AppendText(Folder + "\\" + Filename))
                    {
                        streamWriter.WriteLine(DateTime.Now + "    " + content);
                        if (SoftwareConfiguration.Form != 2)
                        {
                            FrontEndReport.Add("     " + content);
                        }
                    }
                    break;

                case 3:
                    break;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(@"Error in reporter" + ex);
            }
        }
Exemple #3
0
 //Clears the front end report
 public static void ClearList()
 {
     FrontEndReport?.Clear();
 }