ATMLProject.managers.ProjectManager.OpenProject C# (CSharp) Method

OpenProject() public static method

public static OpenProject ( string &testSetName ) : bool
testSetName string
return bool
        public static bool OpenProject( out string testSetName )
        {
            if (HasOpenProject())
                CloseProject();

            testSetName = null;
            //--- Display a list of available test sets and open the one that is selected ---//
            TestProgramSet tps = null;
            if (TestProgramSet.SelectTestSet( out tps ))
            {
                using (new HourGlass())
                {
                    Instance.CurrentTestProgramSet = tps;
                    if (Instance.CurrentTestProgramSet != null)
                    {
                        try
                        {
                            byte[] data =
                                FileManager.ReadFile(
                                    Path.Combine( Instance.CurrentTestProgramSet.TestSetDirectory.FullName,
                                                  ATMLContext.PROJECT_INFO_FILENAME ) );
                            Instance.CurrentTestProgramSet.ProjectInfo = new ProjectInfo( data );
                        }
                        catch (Exception)
                        {
                            ProjectInfo pi = CreateProjectInfoFile();
                            Instance.CurrentTestProgramSet.ProjectInfo = pi;
                        }
                        testSetName = Instance.CurrentTestProgramSet.TestSetName;
                        Instance.OnProjectOpened( testSetName );
                        LogManager.Trace( "Project \"{0}\" has been opened", testSetName );
                    }
                }
            }

            return testSetName != null;
        }

Same methods

ProjectManager::OpenProject ( string projectName ) : string