Ver Mensaje Individual
  #3  
Antiguo 02-12-2019
Avatar de delphi.com.ar
delphi.com.ar delphi.com.ar is offline
Federico Firenze
 
Registrado: may 2003
Ubicación: Buenos Aires, Argentina *
Posts: 5.932
Reputación: 27
delphi.com.ar Va por buen camino
Por si te sirve, aquí tienes tu código, simplificado:

Código:
        public static void brillo()
        {
            Console.Clear();
            while(true)
            {

                Console.SetCursorPosition(0, 0);
                Console.Write($"Luz: {new string('X', luz)}{new string('-', BRILLO_MAX - luz)}");

                switch (Console.ReadKey(true).Key)
                {
                    case ConsoleKey.UpArrow:
                        if (luz < BRILLO_MAX)
                            luz++;
                        break;
                    case ConsoleKey.DownArrow:
                        if (luz > 0)
                            luz--;
                        break;
                    case ConsoleKey.Enter:
                        return;
                }
            }
        }
Saludos!
__________________
delphi.com.ar

Dedique el tiempo suficiente para formular su pregunta si pretende que alguien dedique su tiempo en contestarla.
Responder Con Cita