using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace HasteMillonario
{
class HasteMillonario
{
public Interfaz interfaz;
string[] menuItems = { "Jugar", "Creditos", "Salir" };
public HasteMillonario()
{
int Y = 1;
Console.Title = "$$$ Haste Millonario $$$";
Console.ForegroundColor = ConsoleColor.DarkGreen;
Console.SetWindowSize(110, 40);
interfaz = new Interfaz();
string title = "$$$ Haste Millonario $$$+";
while (!Console.KeyAvailable)
{
Console.BackgroundColor = ConsoleColor.Blue;
Console.Clear();
Console.SetCursorPosition((Console.WindowWidth - title.Length) / 2,
Console.WindowHeight / 2);
Console.BackgroundColor = ConsoleColor.Gray;
Console.ForegroundColor = ConsoleColor.Red;
Console.Write(title);
Thread.Sleep(500);
Console.BackgroundColor = ConsoleColor.Black;
Console.Clear();
Console.SetCursorPosition((Console.WindowWidth - title.Length) / 2,
Console.WindowHeight / 2);
Console.BackgroundColor = ConsoleColor.Red;
Console.ForegroundColor = ConsoleColor.Gray;
Console.Write(title);
Thread.Sleep(500);
}
Console.ReadKey(true);
while (!Console.KeyAvailable)
{
Console.ForegroundColor = ConsoleColor.Blue;
Console.BackgroundColor = ConsoleColor.Black;
Console.Clear();
interfaz.Marco(1, 99, 1, 35);
Console.SetCursorPosition(22, 5);
Console.Write("**** Menu ****");
for (int f = 0; f < 3; f++)
{
Console.SetCursorPosition(26, 11 + f);
Console.WriteLine(menuItems[f]);
}
interfaz.Marco(18, 39, 8, 16);
interfaz.Resalta(Y, menuItems);
switch (Console.ReadKey().Key)
{
case ConsoleKey.UpArrow:
if (Y == 1) Y = 3; else Y--;
break;
case ConsoleKey.DownArrow:
if (Y == 3) Y = 1; else Y++;
break;
case ConsoleKey.Enter:
interfaz.Ejecuta(Y);
break;
}
}
}
}
}