Example #1
0
        /// <summary>
        /// Compiles chemistry logs through a StreamReader into a sorted list of strings.
        /// </summary>
        public void CompileChems()
        {
            //get folder name and files within from user
            string path = FileAccessing.GetFolderPath();

            string[] files = Directory.GetFiles(path);

            //ask user for reagent name
            _reagentName = GetReagentName();

            foreach (string file in files)
            {
                _sr = new StreamReader(file);
                DoLines(_reagentName, _sr);
                _sr.Close();
            }
            Console.WriteLine("Streams closed.");

            //write to file
            DictionaryToOrderedList();
            FileAccessing.WriteToFile(_resultList);

            //empty used collections
            EmptyCollections();

            Console.WriteLine("File written to.");
        }
        /// <summary>
        /// Compiles chemistry logs through a StreamReader into a sorted list of strings.
        /// </summary>
        public void CompileChems()
        {
            //get file name from user
            _sr = FileAccessing.GetFilePath();

            //get reagent name from user
            _reagentName = GetReagentName();

            //process reagents
            DoLines(_reagentName, _sr);
            _sr.Close();
            Console.WriteLine("Streams closed.");

            DictionaryToOrderedList();
            //write to file
            FileAccessing.WriteToFile(_resultList);

            //empty used collections
            EmptyCollections();

            Console.WriteLine("File written.");
        }