Example #1
0
 protected Controller()
 {
     this.oConnection  = B1Connection.getInstance();
     this.oDBFacade    = DBFacade.getInstance();
     this.uiUtils      = new UIUtils(oConnection.Company, oConnection.App);
     this.modeMonitors = new LinkedList <FormMode>();
     this.properties   = Properties.getInstance();
     this.log          = Logger.getInstance();
     log.setProperties(properties);
     log.setUiUtils(uiUtils);
     initAddon();
     log.prepare();
     log.log("Addon iniciado", Logger.LogType.INFO, null, false);
 }
Example #2
0
        //executa configuracoes de inicializacao do addon - criacao de menus,
        //adicao de filtros de eventos...
        public virtual void Init(string addonName)
        {
            try
            {
                log.pushOperation("Addon Initialization");
                CreateMenus();

                CreateFilters();

                if (Properties.getInstance().getByKey("addonConfInit").Equals("1"))
                {
                    CreateAddonDB();

                    AddUserData();

                    AddFormattedSearches();
                }
                else
                {
                    string msg = "Configuracao de addon nao realizada";
                    log.log(msg, Logger.LogType.INFO);
                }

                if (addonName == null)
                {
                    addonName = "Add-on " + Properties.getInstance().getByKey("addonName") + " Iniciado";
                }

                log.log(addonName, Logger.LogType.INFO);
            }
            catch (Exception e)
            {
                SB1ControlException.SB1ControlException.Save(e);
            }
            log.releaseOperation();
        }