Exemple #1
0
        //Create a Dictionary name MIMETypesDictionary to recognize the content of the input file.


        // Create an Introduction Menu to prompt for user input on the menu options
        public static void getoption()
        {
            Console.Write("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
            Console.Write("\n");
            Console.WriteLine("%%%%% " + "Please select an option." + " %%%%%%");
            Console.Write("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
            Console.Write("\n");
            Console.WriteLine("1.View all files in Image Folder");
            Console.WriteLine("2.View all files in Text Folder");
            Console.WriteLine("3.View ALL file");
            Console.WriteLine("4.Perform sorting of files to image and text folders");
            Console.WriteLine("5.Perform Check on abnormal content in Text file");

            string readoption = Console.ReadLine();

            option = System.Convert.ToInt32(readoption);
            if (readoption == "1")
            {
                List <string> Imagefile = MyAssistant.ViewImageFiles();
                MyAssistant.output(Imagefile, null);
            }
            if (readoption == "2")
            {
                List <string> Textfile = MyAssistant.ViewTextFiles();

                MyAssistant.output(Textfile, null);
            }

            if (readoption == "3")
            {
                var Allfiles = MyAssistant.ViewTextFiles().Concat(MyAssistant.ViewImageFiles());

                MyAssistant.output(Allfiles.ToList(), null);
            }
            if (readoption == "4")
            {
                PerformSorting();
            }
            if (readoption == "5")
            {
                PerformAbnormalCheck(@"..\..\..\..\text");
            }
            else
            {
                Console.WriteLine("Invalid Input");
            }
        }
Exemple #2
0
 static void Main(string[] args)
 {
     MyAssistant.getoption();
 }