Exemple #1
0
        protected override void AddServices()
        {
            base.AddServices();

            // Authentication services
            RootWorkItem.Services.AddNew <UserSelectorService, IUserSelectorService>();
            RootWorkItem.Services.Remove <IAuthenticationService>();
            RootWorkItem.Services.AddNew <SimpleWinFormAuthenticationService, IAuthenticationService>();
            RootWorkItem.Services.AddNew <SimpleRoleService, IRoleService>();

            // Profile catalog services
            RootWorkItem.Services.AddNew <ProfileCatalogService, IProfileCatalogService>();
            //Add the InfoStore service we want to use
            //RootWorkItem.Services.AddNew<ProfileCatalogModuleInfoStore, IModuleInfoStore>();
            RootWorkItem.Services.AddNew <WebServiceCatalogModuleInfoStore, IModuleInfoStore>();
            RootWorkItem.Services.Remove <IModuleEnumerator>();
            RootWorkItem.Services.Remove <IModuleLoaderService>();
            RootWorkItem.Services.AddNew <XmlStreamDependentModuleEnumerator, IModuleEnumerator>();
            RootWorkItem.Services.AddNew <DependentModuleLoaderService, IModuleLoaderService>();

            RootWorkItem.Services.AddNew <ActionCatalogService, IActionCatalogService>();
            IUIElementAdapterFactoryCatalog catalog = RootWorkItem.Services.Get <IUIElementAdapterFactoryCatalog>();

            catalog.RegisterFactory(new LinkLabelPanelUIAdapterFactory());
            RootWorkItem.Services.AddNew <WorkspaceLocatorService, IWorkspaceLocatorService>();
            RootWorkItem.Services.AddNew <EntityTranslatorService, IEntityTranslatorService>();
        }
Exemple #2
0
        public void RegisterAdapterFactory(IUIElementAdapterFactory factory)
        {
            IUIElementAdapterFactoryCatalog catalog = workItem.Services.Get <IUIElementAdapterFactoryCatalog>();

            if (catalog != null)
            {
                catalog.RegisterFactory(factory);
            }
        }
        private void RegisterUIElementAdapterFactories()
        {
            IUIElementAdapterFactoryCatalog catalog = RootWorkItem.Services.Get <IUIElementAdapterFactoryCatalog>();

            catalog.RegisterFactory(new XtraNavBarUIAdapterFactory());
            catalog.RegisterFactory(new XtraBarUIAdapterFactory());
            catalog.RegisterFactory(new RibbonUIAdapterFactory());
            catalog.RegisterFactory(new NavigatorCustomButtonUIAdapterFactory());
            catalog.RegisterFactory(new EditorButtonCollectionUIAdapterFactory());
        }
        /// <summary>
        /// See <see cref="CabShellApplication{T,S}.AfterShellCreated"/>
        /// </summary>
        protected override void AfterShellCreated()
        {
            base.AfterShellCreated();

            // register the command adapters
            ICommandAdapterMapService mapService = this.RootWorkItem.Services.Get <ICommandAdapterMapService>();

            mapService.Register(typeof(ToolBase), typeof(ToolBaseCommandAdapter));
            mapService.Register(typeof(UltraExplorerBarItem), typeof(ExplorerBarCommandAdapter));
            mapService.Register(typeof(UltraStatusPanel), typeof(StatusPanelCommandAdapter));

            // register the uiadapter factories
            IUIElementAdapterFactoryCatalog catalog = this.RootWorkItem.Services.Get <IUIElementAdapterFactoryCatalog>();

            catalog.RegisterFactory(new ExplorerBarUIAdapterFactory());
            catalog.RegisterFactory(new StatusBarUIAdapterFactory());
            catalog.RegisterFactory(new ToolbarsManagerUIAdapterFactory());
        }
        private void RegisterUIElementAdapterFactories()
        {
            IUIElementAdapterFactoryCatalog catalog = RootWorkItem.Services.Get <IUIElementAdapterFactoryCatalog>();

            catalog.RegisterFactory(new ItemsControlUIAdapterFactory());
        }