Ejemplo n.º 1
0
        private void PrimaryProjectManagerProxy_ProjectOpened(object sender, EventArgs e)
        {
            projectProxy = PrimaryProjectManagerProxy.PrimaryProject;

            var project_WorkingContext_Proxy = new WorkingContextProxy(projectProxy.WorkingContext);

            var project_WorkingContext_PlatformServiceContainer = project_WorkingContext_Proxy.PlatformServiceContainer;

            if (project_WorkingContext_PlatformServiceContainer != null)
            {
                project_WorkingContext_PlatformServiceContainer.ConstructServiceEvent += Project_WorkingContext_PlatformServiceContainer_ConstructServiceEvent;
                project_WorkingContext_PlatformServiceContainer.ServiceLoadedEvent    += Project_WorkingContext_PlatformServiceContainer_ServiceLoadedEvent;
                project_WorkingContext_PlatformServiceContainer.ServiceAddedEvent     += Project_WorkingContext_PlatformServiceContainer_ServiceAddedEvent;
                project_WorkingContext_PlatformServiceContainer.ServiceRemovedEvent   += Project_WorkingContext_PlatformServiceContainer_ServiceRemovedEvent;
            }

            projectProxy.WorkingContext.AutoLoadDlcs();

            ShowModuleState();
        }
Ejemplo n.º 2
0
        private void CreateWorkingContextHierarchy()
        {
            m_BusinessLogicApplicationContext = new WorkingContext(false,
                                                                   WorkingContextEnvironment.Application,
                                                                   AppId,
                                                                   "Project"
                                                                   );

            m_BusinessLogicApplicationContext.ConstructServiceEvent           += m_BusinessLogicApplicationContext_ConstructServiceEvent;
            m_BusinessLogicApplicationContext.ServiceLoadedEvent              += m_BusinessLogicApplicationContext_ServiceLoadedEvent;
            m_BusinessLogicApplicationContext.ServiceAddedEvent               += m_BusinessLogicApplicationContext_ServiceAddedEvent;
            m_BusinessLogicApplicationContext.WorkingContextChildCreatedEvent += M_BusinessLogicApplicationContext_WorkingContextChildCreatedEvent;

            m_BusinessLogicApplicationContext.AutoLoadDlcs();

            WorkingContextProxy      wcp = new WorkingContextProxy(m_BusinessLogicApplicationContext);
            PlatformServiceContainer psc = wcp.PlatformServiceContainer;

            m_ViewApplicationContext = new WorkingContext(true,
                                                          WorkingContextEnvironment.Application,
                                                          AppId,
                                                          "Project"
                                                          );
            m_ViewApplicationContext.SiblingInBusinessLogicContext = m_BusinessLogicApplicationContext;

            m_ViewApplicationContext.ConstructServiceEvent += M_ViewApplicationContext_ConstructServiceEvent;
            m_ViewApplicationContext.ServiceLoadedEvent    += M_ViewApplicationContext_ServiceLoadedEvent;
            m_ViewApplicationContext.ServiceAddedEvent     += M_ViewApplicationContext_ServiceAddedEvent;
            m_ViewApplicationContext.AutoLoadDlcs();



            PersistenceWorkingContext = new WorkingContext(m_ViewApplicationContext,
                                                           WorkingContextEnvironment.Persistence);

            PrimaryProjectUiWorkingContextManagerProxy = m_ViewApplicationContext.GetPrimaryProjectUiWorkingContextManagerProxy();
            PrimaryProjectManagerProxy =
                PrimaryProjectUiWorkingContextManagerProxy.PrimaryProjectManager;
        }