using System; using System.ServiceProcess; using FilterAPI; using FilterAPI.CustomCurrency; using FilterPayment.LocalHandlers; using FilterPayment.LocalNetworking; using FilterPayment.PaymentNetworking; namespace FilterPayment { 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; PaymentListener PListen = new PaymentListener(); } private void CurrentDomain_UnhandledException(Object Sender, UnhandledExceptionEventArgs Args) { Program.SendConsoleText(ConsoleColor.Red, ((Exception)Args.ExceptionObject).ToString()); } protected override void OnStop() { } } }