using System; using System.Timers; using System.ServiceProcess; using FilterAPI; using FilterAPI.Networking; using FilterAPI.CustomCurrency; using FilterLauncher.LocalHandlers; using FilterLauncher.LocalNetworking; using FilterLauncher.LauncherNetworking; namespace FilterLauncher { public partial class Service : ServiceBase { public Service() { } protected override void OnStart(String[] Args) { Program.Auth = new Authentication(); Program.SQL = new Database(Program.Auth); Program.Currencies = new CurrencyLoader(Program.Auth); Program.LocalHandlers = new LocalHandlerLoader(); Program.LocalClient = new LocalClient(); AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; LauncherListener LListen = new LauncherListener(); } private void CurrentDomain_UnhandledException(Object Sender, UnhandledExceptionEventArgs Args) { Program.SendConsoleText(ConsoleColor.Red, ((Exception)Args.ExceptionObject).ToString()); } protected override void OnStop() { } } }