示例#1
0
        public void SetMainMenu(IMainMenuInstance mainMenu)
        {
            var listener = CreateMainMenuEventListener(mainMenu);

            listener.Subscribe();
            B1EventFilterManager.Include(BoEventTypes.et_MENU_CLICK, @"ALL_FORMS");
        }
示例#2
0
        private void AddSystemFormLoadListener(Type classType)
        {
            var attribute = GetAttribute <B1SystemFormTypeAttribute>(classType);
            var formType  = attribute.FormType;

            var loadListener = new SystemFormLoadHandler(application, formType, classType);

            B1ItemEventDispatcher.AddListener(loadListener);
            B1EventFilterManager.Include(BoEventTypes.et_FORM_LOAD, formType);
        }
示例#3
0
        /// <summary>
        /// Starts up the events managing system.
        /// </summary>
        public void Initialize()
        {
            B1EventFilterManager.Initialize(application);

            SetApplicationEventListener();
            StartEventDispatchers();

            AddSystemFormLoadListeners();
            AddEventSinks();

            SetMainMenu();
        }
示例#4
0
        /// <summary>
        /// Starts up the events managing system.
        /// </summary>
        public void Initialize(Application app, IApplicationEventsHandler handler)
        {
            application   = app;
            assembly      = GetAssembly(handler);
            assemblyTypes = GetAssemblyTypes(assembly);

            B1EventFilterManager.Initialize(app);

            CreateDispatchers(handler);
            StartEventDispatchers();

            AddSystemFormLoadListeners();
            AddEventSinks();
        }
示例#5
0
 private void OnHandlerAdded(object sender, HandlerAddedEventArgs e)
 {
     B1EventFilterManager.Include(e.EventType, e.FormType);
 }