コード例 #1
0
 /// <summary>
 /// Terminates the event managing system.
 /// </summary>
 public void Terminate()
 {
     B1ItemEventDispatcher.Unsubscribe();
     B1MenuEventDispatcher.Unsubscribe();
     B1RightClickEventDispatcher.Unsubscribe();
     B1LayoutKeyEventDispatcher.Unsubscribe();
     B1FormDataEventDispatcher.Unsubscribe();
     B1ApplicationEventDispatcher.Unsubscribe();
 }
コード例 #2
0
        private void StartEventDispatchers()
        {
            B1ApplicationEventDispatcher.Subscribe(application);
            B1ItemEventDispatcher.Subscribe(application);
            B1MenuEventDispatcher.Subscribe(application);
            B1RightClickEventDispatcher.Subscribe(application);
            B1FormDataEventDispatcher.Subscribe(application);
            B1LayoutKeyEventDispatcher.Subscribe(application);

            B1ApplicationEventDispatcher.EventHandlerError += OnEventHandlerError;
            B1MenuEventDispatcher.EventHandlerError        += OnEventHandlerError;
            B1RightClickEventDispatcher.EventHandlerError  += OnEventHandlerError;
            B1ItemEventDispatcher.EventHandlerError        += OnEventHandlerError;
            B1FormDataEventDispatcher.EventHandlerError    += OnEventHandlerError;
            B1LayoutKeyEventDispatcher.EventHandlerError   += OnEventHandlerError;
        }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="B1Session" /> class.
        /// </summary>
        /// <param name="application">
        /// The application.
        /// </param>
        /// <param name="applicationEventsHandler">
        /// The instance responsible for application event handling.
        /// </param>
        /// <param name="mainMenu">
        /// The main menu instance.
        /// </param>
        public B1Session(
            Application application,
            IApplicationEventsHandler applicationEventsHandler,
            [CanBeNull] IMainMenuInstance mainMenu)
        {
            this.application = application;
            assembly         = applicationEventsHandler.GetType().Assembly;
            this.applicationEventsHandler = applicationEventsHandler;
            this.mainMenu = mainMenu ?? new NullMainMenuInstance();

            B1ApplicationEventDispatcher = new B1ApplicationEventDispatcher();
            B1FormDataEventDispatcher    = new B1FormDataEventDispatcher();
            B1MenuEventDispatcher        = new B1MenuEventDispatcher();
            B1ItemEventDispatcher        = new B1ItemEventDispatcher();
            B1RightClickEventDispatcher  = new B1RightClickEventDispatcher();
            B1LayoutKeyEventDispatcher   = new B1LayoutKeyEventDispatcher();
        }
コード例 #4
0
 private void SetApplicationEventListener()
 {
     B1ApplicationEventDispatcher.SetListener(applicationEventsHandler);
 }