Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            if (!Environment.UserInteractive)
            {
                ServiceBase.Run(new Service1());
            }
            else
            {
                Bootstrap.Initialize();
                Bootstrap.Start();

                Console.BackgroundColor = ConsoleColor.Black;
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Initialize success...");
                Console.ResetColor();
                Console.WriteLine();

                Console.WriteLine("Press enter to exit...");
                var line = Console.ReadLine();
                while (line != "exit")
                {
                    switch (line)
                    {
                    case "cls":
                        Console.Clear();
                        break;

                    default:
                        return;
                    }
                    line = Console.ReadLine();
                }
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Bootstrap.Initialize();
            Bootstrap.Start();
            Console.WriteLine("Press enter to exit...");
            var line = Console.ReadLine();

            while (line != "exit")
            {
                switch (line)
                {
                case "cls":
                    Console.Clear();
                    break;

                default:
                    return;
                }
                line = Console.ReadLine();
            }
        }
Ejemplo n.º 3
0
 public Service1()
 {
     InitializeComponent();
     Bootstrap.Initialize();
 }