![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#2
|
|||
|
|||
|
Hola:
Por ahora he llegado hasta aquí y funciona. Código:
public static void brillo()
{
ConsoleKey teclaBrillo;
Console.Clear();
do
{
Console.SetCursorPosition(0, 0);
Console.Write("Luz: ");
for (int i = 0; i < luz; i++)
{
Console.Write("X");
}
for (int j = 0; j < (BRILLO_MAX - luz); j++)
{
Console.Write("-");
}
teclaBrillo = Console.ReadKey(true).Key;
// ¿Se pulsó el cursor arriba?
if (teclaBrillo == ConsoleKey.UpArrow)
{
//¿no llega al limite?
if (luz < BRILLO_MAX)
{
// Incrementa 1.
luz++;
}
}
if (teclaBrillo == ConsoleKey.DownArrow)
{
if (luz > 0)
{
// Decremmenta 1.
luz--;
}
}
} while (teclaBrillo != ConsoleKey.Enter);
}
Sigo con el resto de las opciones. Saludos.
__________________
http://electronica-pic.blogspot.com....n-arduino.html Manuales de electrónica general, PIC y Arduino. |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Para entrar en trance... | AzidRain | La Taberna | 4 | 06-03-2009 15:26:08 |
| Evento al entrar al Form | lunygar | Varios | 5 | 11-01-2008 17:54:28 |
| No me deja entrar xp a pc con win98 se ! | Arturo | Windows | 0 | 15-05-2006 22:46:43 |
| No me deja entrar al Interbase | nuri | Firebird e Interbase | 2 | 14-07-2005 12:58:02 |
| Cómo entrar a la disco | roman | Humor | 24 | 31-05-2004 19:34:56 |
|