Ejemplo n.º 1
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();
        }
Ejemplo n.º 2
0
 private Assembly GetAssembly(IApplicationEventsHandler handler)
 {
     return(handler.GetType().Assembly);
 }