示例#1
0
 public ConsoleWriter(CultureInfo cultureInfo, ConsoleChangeColor pconsoleChangeColor)
 {
     Thread.CurrentThread.CurrentCulture   = cultureInfo;
     Thread.CurrentThread.CurrentUICulture = cultureInfo;
     Console.InputEncoding  = Encoding.Unicode;
     Console.OutputEncoding = Encoding.Unicode;
     consoleChangeColor     = pconsoleChangeColor;
 }
        static void Main(string[] args)
        {
            string[]    names             = new string[_peopleCount];
            int[]       ages              = new int[names.Length];
            CultureInfo cultureInfo       = CultureInfo.InvariantCulture;
            var         counting          = new Counting();
            var         consoleChangColor = new ConsoleChangeColor();
            var         writer            = new ConsoleWriter(cultureInfo, consoleChangColor);
            var         inputWork         = new ConsoleInput(writer);
            var         outputWork        = new ConsoleOutput(writer, counting);

            work(inputWork, outputWork, names, ages);
            Console.ReadKey();
        }