static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } LogService.Filename("AddonTransportes"); DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); Menu MyMenu = new Menu(); Freights lObjFreights = new Freights(); MyMenu.AddMenuItems(); oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); //Initialize Tables UIApplication.ShowSuccess(string.Format("Inicializar las tablas")); TransportServiceFactory mObjServiceFactory = new TransportServiceFactory(); mObjServiceFactory.GetSetUpService().InitializeTables(); UIApplication.ShowSuccess(string.Format("Addon de transportes 1.0.18 iniciado correctamente")); LogService.WriteSuccess("Addon de transportes 1.0.18 iniciado correctamente"); oApp.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }