/// <summary>
        /// Constructor
        /// </summary>
        /// <param name="displayManager"></param>
        protected AbstractControlManager(IDisplayManager displayManager)
        {
            m_displayManager = displayManager;

            var ccf = ServiceProvider.GetService<IControlCollectionFactory>();
            if (ccf != null)
            {
                m_controlCheckExceptionProcess = ccf.CreateControlCheckExceptionProcess(this);
                m_stateControls = ccf.CreateStateControlCollection(this);
                m_checkControls = ccf.CreateCheckControlCollection(this);
            }
            else
            {
                m_controlCheckExceptionProcess = null;
                m_stateControls = new StateControlCollection();
                m_checkControls = new CheckControlCollection();
            }

            //this.StateControls.Add(m_displayManager.BindingControls);

            if (m_displayManager != null && m_displayManager.SearchManager != null)
            {
                m_displayManager.SearchManager.DataLoading += new EventHandler<DataLoadingEventArgs>(SearchManager_DataLoading);
                m_displayManager.SearchManager.DataLoaded += new EventHandler<DataLoadedEventArgs>(SearchManager_DataLoaded);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="displayManager"></param>
        protected AbstractControlManager(IDisplayManager displayManager)
        {
            m_displayManager = displayManager;

            var ccf = ServiceProvider.GetService <IControlCollectionFactory>();

            if (ccf != null)
            {
                m_controlCheckExceptionProcess = ccf.CreateControlCheckExceptionProcess(this);
                m_stateControls = ccf.CreateStateControlCollection(this);
                m_checkControls = ccf.CreateCheckControlCollection(this);
            }
            else
            {
                m_controlCheckExceptionProcess = null;
                m_stateControls = new StateControlCollection();
                m_checkControls = new CheckControlCollection();
            }

            //this.StateControls.Add(m_displayManager.BindingControls);

            if (m_displayManager != null && m_displayManager.SearchManager != null)
            {
                m_displayManager.SearchManager.DataLoading += new EventHandler <DataLoadingEventArgs>(SearchManager_DataLoading);
                m_displayManager.SearchManager.DataLoaded  += new EventHandler <DataLoadedEventArgs>(SearchManager_DataLoaded);
            }
        }