CreateProjectContext() public method

public CreateProjectContext ( string projectPath ) : Bloom.ProjectContext
projectPath string
return Bloom.ProjectContext
Beispiel #1
0
        /// ------------------------------------------------------------------------------------
        private static bool OpenProjectWindow(string projectPath)
        {
            Debug.Assert(_projectContext == null);

            CheckAndWarnAboutVirtualStore();

            try
            {
                //NB: initially, you could have multiple blooms, if they were different projects.
                //however, then we switched to the embedded http image server, which can't share
                //a port. So we could fix that (get different ports), but for now, I'm just going
                //to lock it down to a single bloom

/*					if (!GrabTokenForThisProject(projectPath))
 *                                      {
 *                                              return false;
 *                                      }
 */
                _projectContext = _applicationContainer.CreateProjectContext(projectPath);
                _projectContext.ProjectWindow.Closed    += HandleProjectWindowClosed;
                _projectContext.ProjectWindow.Activated += HandleProjectWindowActivated;

                _projectContext.ProjectWindow.Show();

                if (_splashForm != null)
                {
                    _splashForm.StayAboveThisWindow(_projectContext.ProjectWindow);
                }

                return(true);
            }
            catch (Exception e)
            {
                HandleErrorOpeningProjectWindow(e, projectPath);
            }

            return(false);
        }