using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace SoloEnLan
{
    internal static class Program
    {
        /// <summary>
        /// Punto de entrada principal para la aplicación.
        /// </summary>
        static void Main()
        {
            ServiceBase[] ServicesToRun;

            if (int.Parse(ConfigurationManager.AppSettings["consola"]) == 1)
            {
                var s = new SoloEnLan();
                s.inicia();
                while(true)
                {
                    Thread.Sleep(100);
                }
            }
            else
            {
                ServicesToRun = new ServiceBase[]
                {
                    new SoloEnLan()
                };
                ServiceBase.Run(ServicesToRun);
            }
        }
    }
}
