public void render(FileProcessor processor)
        {
            MorsePlayer player = new MorsePlayer(new MorseProcessor(15));
            StringBuilder pResult = new StringBuilder(256);

            pResult.AppendFormat("Found {0} files(s) with {1} hidden and {2} innacessible", processor.FileCount, processor.HiddenFileCount, processor.InaccesibleFileCount);
            pResult.AppendFormat(" and found {0} folder(s) with {1} hidden and {2} innacessible", processor.FileCount, processor.HiddenFileCount, processor.InaccesibleFileCount);

            player.Text = pResult.ToString().Trim();
            player.Play();

            Console.WriteLine();
            Console.WriteLine(pResult.ToString());
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.Title = "My Rainbow Beep";
            FileProcessor p = new FileProcessor(new ConsoleMorseFileProcessorRenderer());

            p.Process(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures));
            p.ShowResults();

            char key = 'c';
            do
            {
                key = Console.ReadKey().KeyChar;
                Random rnd = new Random();

                Console.BackgroundColor = getRandomColor();
                Console.ForegroundColor = getRandomColor();
                Console.CursorSize = rnd.Next(10, 25);
                Console.SetCursorPosition(rnd.Next(1, 80), rnd.Next(1, 60));
            }
            while (key != 'q');
        }
 public void render(FileProcessor processor)
 {
     Console.WriteLine("Found {0} files(s) with {1} hidden and {2} innacessible", processor.FileCount, processor.HiddenFileCount, processor.InaccesibleFileCount);
     Console.WriteLine("Found {0} folder(s) with {1} hidden and {2} innacessible", processor.DirectoryCount, processor.HiddenDirectoryCount, processor.InaccesibleDirectoryCount);
 }