コード例 #1
0
        public void Run()
        {
            Console.WriteLine("Choose file:");        // Prompt
            Console.WriteLine("1 - genomeTiny.txt");  // Prompt
            Console.WriteLine("2 - genomeVirus.txt"); // Prompt
            Console.WriteLine("or quit");             // Prompt

            var fileNumber = Console.ReadLine();
            var fieName    = string.Empty;

            switch (fileNumber)
            {
            case "1":
                fieName = "genomeTiny.txt";
                break;

            case "2":
                fieName = "genomeVirus.txt";
                break;

            case "quit":
                return;

            default:
                return;
            }


            var @in     = new In($"Files\\Strings\\{fieName}");
            var content = @in.ReadAll();
            var genome  = new Genome();

            genome.Compress(content);
            genome.Expand();


            Console.ReadLine();
        }