Exemplo n.º 1
0
        public bool OpenProjectReadWrite(string path, out object projectO, bool silent = false)
        {
            OpenProjectParams parameters = new OpenProjectParams(path);

            parameters.Access = TiaProjectAccess.ReadWrite;
            parameters.Silent = silent;
            ITiaProject project;
            bool        returnB;

            try
            {
                returnB = m_PrimaryProjectManager.OpenProject(parameters, out project);

                if (project != null)
                {
                    projectO = new TiaProjectProxy(project);
                }
                else
                {
                    projectO = null;
                }
                return(returnB);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                projectO = null;
                return(false);
            }
        }
Exemplo n.º 2
0
        public bool OpenProjectReadOnly(string path, out object projectO, bool silent = false)
        {
            OpenProjectParams parameters = new OpenProjectParams(path);

            parameters.Access = TiaProjectAccess.ReadOnly;
            parameters.Silent = silent;
            ITiaProject project;
            bool        returnB = m_PrimaryProjectManager.OpenProject(parameters, out project);

            if (project != null)
            {
                projectO = new TiaProjectProxy(project);
            }
            else
            {
                projectO = null;
            }
            return(returnB);
        }
Exemplo n.º 3
0
        public bool OpenProjectReadWrite(string path, out object projectO, bool silent = false)
        {
            OpenProjectParams parameters = new OpenProjectParams(path);

            parameters.Access = TiaProjectAccess.ReadWrite;
            parameters.Silent = silent;
            //parameters.OpenCallback = new UpgradeCurrentOpenCallback(new OpenProjectCommandData.CachingOpenFeedbackHandler());
            ITiaProject project;
            bool        returnB = TiaProjectManager.OpenProject(parameters, out project);

            if (project != null)
            {
                projectO = new TiaProjectProxy(project);
            }
            else
            {
                projectO = null;
            }
            return(returnB);
        }