/// <summary> /// Main mehtod /// </summary> static void Main() { try { //Connect UI Connect.ConnectUI(); if (Connect.ConnectDI() != 0) { //Get Last Error Description string error = PublicVariable.oCompany.GetLastErrorDescription(); } else { //Menu Initialization SAPCLASS.Menu oMenus = new SAPCLASS.Menu(); oMenus.Remove(); oMenus.Create(); //Enable Events Events.Enable(); //Metadata Initialization Metadata oMetadata = new Metadata(); oMetadata.RegisterMetadata(); } } catch (Exception ex) { Events.App_StatusBarEvent( ex.Message , SAPbouiCOM.BoMessageTime.bmt_Short , SAPbouiCOM.BoStatusBarMessageType.smt_Warning); } //Run on Background System.Windows.Forms.Application.Run(); }