Exemple #1
0
        private void UIAppEvent(BoAppEventTypes EventType)
        {
            try
            {
                switch (EventType)

                {
                case SAPbouiCOM.BoAppEventTypes.aet_ShutDown:
                    System.Environment.Exit(0);
                    break;

                case SAPbouiCOM.BoAppEventTypes.aet_CompanyChanged:
                    System.Environment.Exit(0);
                    break;

                case SAPbouiCOM.BoAppEventTypes.aet_ServerTerminition:
                    System.Environment.Exit(0);
                    break;
                }
            }
            catch (Exception ex)
            {
                klib.Shell.WriteLine(R.Project.ID, LOG, ex);
            }
        }
        private void OApplication_AppEvent(BoAppEventTypes EventType)
        {
            switch (EventType)
            {
            case SAPbouiCOM.BoAppEventTypes.aet_CompanyChanged:
                oApplication.MessageBox("A Empresa foi trocada");
                System.Windows.Forms.Application.Exit();
                break;

            case SAPbouiCOM.BoAppEventTypes.aet_ShutDown:
                oApplication.MessageBox("O evento Shut Down foi chamado!!"
                                        + Environment.NewLine
                                        + "Fechando o Addon...", 1, "OK", "", "");
                System.Windows.Forms.Application.Exit();
                break;

            case SAPbouiCOM.BoAppEventTypes.aet_LanguageChanged:
                oApplication.MessageBox("O Idioma Foi modificado");
                break;

            case SAPbouiCOM.BoAppEventTypes.aet_FontChanged:
                oApplication.MessageBox("A fonte foi alterada");
                break;

            case SAPbouiCOM.BoAppEventTypes.aet_ServerTerminition:
                oApplication.MessageBox("O Servidor Caiu");
                System.Windows.Forms.Application.Exit();
                break;
            }
        }
Exemple #3
0
        private void oApplication_appEvent(BoAppEventTypes EventType)
        {
            switch (EventType)
            {
            case BoAppEventTypes.aet_CompanyChanged:
                System.Windows.Forms.Application.Exit();
                break;

            case BoAppEventTypes.aet_ShutDown:
                System.Windows.Forms.Application.Exit();
                break;

            case BoAppEventTypes.aet_LanguageChanged:
                string lang = oApplication.Language.ToString();
                Program.sboLanguage = lang;
                try
                {
                    int langnum = Convert.ToInt16(oApplication.Language.ToString());
                    lang = "_" + lang;
                }
                catch
                {
                }
                loadMenu(lang);
                break;
            }
        }
        internal void app_Handler(BoAppEventTypes EventType)
        {
            switch (EventType)
            {
            case SAPbouiCOM.BoAppEventTypes.aet_ShutDown:
                //Exit Add-On
                System.Windows.Forms.Application.Exit();
                borraMenu();
                break;

            case SAPbouiCOM.BoAppEventTypes.aet_CompanyChanged:
                borraMenu();
                break;

            case SAPbouiCOM.BoAppEventTypes.aet_FontChanged:
                // borraMenu();
                break;

            case SAPbouiCOM.BoAppEventTypes.aet_LanguageChanged:
                // borraMenu();
                break;

            case SAPbouiCOM.BoAppEventTypes.aet_ServerTerminition:
                borraMenu();
                break;

            default:
                borraMenu();
                break;
            }
        }
Exemple #5
0
 private static void AppEvent(BoAppEventTypes EventType)
 {
     if (EventType == BoAppEventTypes.aet_ShutDown)
     {
         RemoverMenu();
     }
 }
        public void OnAppEvents(BoAppEventTypes EventType)
        {
            switch (EventType)
            {
            case BoAppEventTypes.aet_CompanyChanged:
                if (eCommon.SBO_Application.Menus.Exists(SBOAddon.gcAddOnName))
                {
                    eCommon.SBO_Application.Menus.RemoveEx(SBOAddon.gcAddOnName);
                }
                System.Windows.Forms.Application.Exit();
                break;

            case BoAppEventTypes.aet_FontChanged:
                break;

            case BoAppEventTypes.aet_LanguageChanged:
                break;

            case BoAppEventTypes.aet_ServerTerminition:
                break;

            case BoAppEventTypes.aet_ShutDown:
                if (eCommon.SBO_Application.Menus.Exists(SBOAddon.gcAddOnName))
                {
                    eCommon.SBO_Application.Menus.RemoveEx(SBOAddon.gcAddOnName);
                }
                System.Windows.Forms.Application.Exit();
                break;
            }
        }
        private void OnAppEvent(BoAppEventTypes eventType)
        {
            switch (eventType)
            {
            case BoAppEventTypes.aet_LanguageChanged:
                SafeInvoke(eventsHandler.OnLanguageChanged);
                break;

            case BoAppEventTypes.aet_CompanyChanged:
                SafeInvoke(eventsHandler.OnCompanyChanged);
                break;

            case BoAppEventTypes.aet_FontChanged:
                SafeInvoke(eventsHandler.OnFontChanged);
                break;

            case BoAppEventTypes.aet_ServerTerminition:
                SafeInvoke(eventsHandler.OnAddonStopped);
                break;

            case BoAppEventTypes.aet_ShutDown:
                SafeInvoke(eventsHandler.OnShutdown);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(eventType), eventType, null);
            }
        }
 private void OApplication_AppEvent(BoAppEventTypes EventType)
 {
     if (EventType == BoAppEventTypes.aet_ShutDown)
     {
         System.Windows.Forms.Application.Exit();
     }
 }
        private static void AppEvent(BoAppEventTypes EventType)
        {
            if (EventType == BoAppEventTypes.aet_ShutDown)
            {
                RemoverMenu();

                // remove a aplicação da memória
                System.Windows.Forms.Application.Exit();
            }
        }
Exemple #10
0
 private void SBO_Application_AppEvent(BoAppEventTypes EventType)
 {
     if (EventType == SAPbouiCOM.BoAppEventTypes.aet_ServerTerminition || EventType == SAPbouiCOM.BoAppEventTypes.aet_ShutDown)
     {
         AppContext
         .SBOApplication
         .StatusBar
         .SetText("Finalizando Add-on de Pagos de Cadelga...", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);
         System.Windows.Forms.Application.Exit();
     }
 }
 public static void AppEvent(BoAppEventTypes EventType)
 {
     switch (EventType)
     {
     case SAPbouiCOM.BoAppEventTypes.aet_ShutDown:
     case SAPbouiCOM.BoAppEventTypes.aet_CompanyChanged:
     case SAPbouiCOM.BoAppEventTypes.aet_LanguageChanged:
     case SAPbouiCOM.BoAppEventTypes.aet_ServerTerminition:
         System.Environment.Exit(0);
         break;
     }
 }
Exemple #12
0
 private void OApplication_AppEvent(BoAppEventTypes EventType)
 {
     switch (EventType)
     {
     case SAPbouiCOM.BoAppEventTypes.aet_ShutDown:
         oApplication.MessageBox("O evento Shut Down foi chamado!!"
                                 + Environment.NewLine
                                 + string.Format("Fechando o Addon {0}...",
                                                 System.Windows.Forms.Application.ProductName)
                                 , 1, "OK", "", "");
         System.Windows.Forms.Application.Exit();
         break;
     }
 }
Exemple #13
0
        public static void CatchAppEvents(BoAppEventTypes pVal)
        {
            try
            {
                switch (pVal)
                {
                case BoAppEventTypes.aet_CompanyChanged:
                    if (AppCompanyChanged != null)
                    {
                        AppCompanyChanged(ref pVal);
                    }
                    break;

                case BoAppEventTypes.aet_FontChanged:
                    if (AppFontChanged != null)
                    {
                        AppFontChanged(ref pVal);
                    }
                    break;

                case BoAppEventTypes.aet_LanguageChanged:
                    if (AppLanguageChanged != null)
                    {
                        AppLanguageChanged(ref pVal);
                    }
                    break;

                case BoAppEventTypes.aet_ServerTerminition:
                    if (AppServerTerminition != null)
                    {
                        AppServerTerminition(ref pVal);
                    }
                    break;

                case BoAppEventTypes.aet_ShutDown:
                    if (AppShutdown != null)
                    {
                        AppShutdown(ref pVal);
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                B1Exception.throwException("Erro evento App:", ex);
            }
        }
Exemple #14
0
        /// <summary>
        /// Display some system detection
        /// </summary>
        /// <param name="EventType"></param>
        private void Application_AppEvent(BoAppEventTypes EventType)
        {
            switch (EventType)
            {
            case BoAppEventTypes.aet_ShutDown:
                Application.MessageBox("Shutdown detected");
                System.Windows.Forms.Application.Exit();
                break;

            case BoAppEventTypes.aet_CompanyChanged:
                Application.MessageBox("Company changed detected");
                break;

            case BoAppEventTypes.aet_LanguageChanged:
                Application.MessageBox("Language changed");
                break;
            }
        }
Exemple #15
0
        private void OApplication_AppEvent(BoAppEventTypes EventType)
        {
            switch (EventType)
            {
            case SAPbouiCOM.BoAppEventTypes.aet_CompanyChanged:
                oApplication.MessageBox("A Empresa foi trocada");
                System.Windows.Forms.Application.Exit();
                break;

            case SAPbouiCOM.BoAppEventTypes.aet_ShutDown:
                oApplication.MessageBox("O evento Shut Down foi chamado!!"
                                        + Environment.NewLine
                                        + "Fechando o Addon..."
                                        , 1, "OK", "", "");
                System.Windows.Forms.Application.Exit();
                break;
            }
        }
Exemple #16
0
        protected void OnApplicationEvent(BoAppEventTypes EventType)
        {
            switch (EventType)
            {
            case SAPbouiCOM.BoAppEventTypes.aet_ShutDown:
                OnAppShutDown(this, EventArgs.Empty);
                Exit();
                break;

            case SAPbouiCOM.BoAppEventTypes.aet_CompanyChanged:
                OnAppCompanyChanged(this, EventArgs.Empty);
                Exit();
                break;

            case SAPbouiCOM.BoAppEventTypes.aet_ServerTerminition:
                OnAppServerTermination(this, EventArgs.Empty);
                Exit();
                break;
            }
        }
        private void OnAppEvent(BoAppEventTypes eventType)
        {
            try
            {
                if (eventsHandler == null)
                {
                    throw new InvalidOperationException("There is no listener for 'Application.AppEvent'.");
                }

                switch (eventType)
                {
                case BoAppEventTypes.aet_LanguageChanged:
                    eventsHandler.OnLanguageChanged();
                    break;

                case BoAppEventTypes.aet_CompanyChanged:
                    eventsHandler.OnCompanyChanged();
                    break;

                case BoAppEventTypes.aet_FontChanged:
                    eventsHandler.OnFontChanged();
                    break;

                case BoAppEventTypes.aet_ServerTerminition:
                    eventsHandler.OnAddonStopped();
                    break;

                case BoAppEventTypes.aet_ShutDown:
                    eventsHandler.OnShutdown();
                    break;

                default:
                    throw new ArgumentOutOfRangeException(nameof(eventType), eventType, null);
                }
            }
            catch (Exception e)
            {
                EventHandlerError(null, new ErrorEventArgs(e));
            }
        }
 public virtual void AppFontChanged(ref BoAppEventTypes pVal)
 {
 }
 public virtual void AppLanguageChanged(ref BoAppEventTypes pVal)
 {
 }
 public virtual void AppCompanyChanged(ref BoAppEventTypes pVal)
 {
 }
 public virtual void AppServerTerminition(ref BoAppEventTypes pVal)
 {
 }
 public virtual void AppShutdown(ref BoAppEventTypes pVal)
 {
 }
Exemple #23
0
 public void oApplication_AppEvent(BoAppEventTypes EventType)
 {
 }