コード例 #1
0
ファイル: HaxeProject.cs プロジェクト: tienery/flashdevelop
        public static HaxeProject Load(string path)
        {
            string ext = Path.GetExtension(path).ToLower();

            if (ext == ".hxml")
            {
                HaxeProject hxproj = new HaxeProject(path);
                hxproj.RawHXML = File.ReadAllLines(path);
                return(hxproj);
            }
            else if (ext == ".nmml")
            {
                HaxeProject hxproj = new HaxeProject(path);
                hxproj.MovieOptions.Platform = HaxeMovieOptions.NME_PLATFORM;
                hxproj.OutputType            = OutputType.Application;
                hxproj.OutputPath            = hxproj.GetRelativePath(path);
                return(hxproj);
            }

            HaxeProjectReader reader = new HaxeProjectReader(path);

            try
            {
                return(reader.ReadProject());
            }
            catch (System.Xml.XmlException exception)
            {
                string format = string.Format("Error in XML Document line {0}, position {1}.",
                                              exception.LineNumber, exception.LinePosition);
                throw new Exception(format, exception);
            }
            finally { reader.Close(); }
        }
コード例 #2
0
ファイル: HaxeProject.cs プロジェクト: zvoronz/flashdevelop
        public static HaxeProject Load(string path)
        {
            string ext = Path.GetExtension(path).ToLower();

            if (ext == ".hxml")
            {
                HaxeProject hxproj = new HaxeProject(path);
                hxproj.RawHXML = File.ReadAllLines(path);
                return(hxproj);
            }

            HaxeProjectReader reader = new HaxeProjectReader(path);

            try
            {
                return(reader.ReadProject());
            }
            catch (XmlException exception)
            {
                string format = string.Format("Error in XML Document line {0}, position {1}.",
                                              exception.LineNumber, exception.LinePosition);
                throw new Exception(format, exception);
            }
            finally { reader.Close(); }
        }
コード例 #3
0
        public static HaxeProject Load(string path)
        {
            HaxeProjectReader reader = new HaxeProjectReader(path);

            try
            {
                return(reader.ReadProject());
            }
            catch (System.Xml.XmlException exception)
            {
                string format = string.Format("Error in XML Document line {0}, position {1}.",
                                              exception.LineNumber, exception.LinePosition);
                throw new Exception(format, exception);
            }
            finally { reader.Close(); }
        }
コード例 #4
0
ファイル: HaxeProject.cs プロジェクト: Gr33z00/flashdevelop
        public static HaxeProject Load(string path)
        {
            string ext = Path.GetExtension(path).ToLower();
            if (ext == ".hxml")
            {
                HaxeProject hxproj = new HaxeProject(path);
                hxproj.RawHXML = File.ReadAllLines(path);
                return hxproj;
            }
            else if (ext == ".nmml")
            {
                HaxeProject hxproj = new HaxeProject(path);
                hxproj.MovieOptions.Platform = HaxeMovieOptions.NME_PLATFORM;
                hxproj.OutputType = OutputType.Application;
                hxproj.OutputPath = hxproj.GetRelativePath(path);
                return hxproj;
            }

            HaxeProjectReader reader = new HaxeProjectReader(path);

            try
            {
                return reader.ReadProject();
            }
            catch (System.Xml.XmlException exception)
            {
                string format = string.Format("Error in XML Document line {0}, position {1}.",
                    exception.LineNumber, exception.LinePosition);
                throw new Exception(format, exception);
            }
            finally { reader.Close(); }
        }
コード例 #5
0
        public static HaxeProject Load(string path)
        {
            string ext = Path.GetExtension(path).ToLower();
            if (ext == ".hxml")
            {
                HaxeProject hxproj = new HaxeProject(path);
                hxproj.RawHXML = File.ReadAllLines(path);
                return hxproj;
            }

            HaxeProjectReader reader = new HaxeProjectReader(path);

            try
            {
                return reader.ReadProject();
            }
            catch (XmlException exception)
            {
                string format = string.Format("Error in XML Document line {0}, position {1}.",
                    exception.LineNumber, exception.LinePosition);
                throw new Exception(format, exception);
            }
            finally { reader.Close(); }
        }
コード例 #6
0
ファイル: HaxeProject.cs プロジェクト: heon21st/flashdevelop
        public static HaxeProject Load(string path)
        {
            HaxeProjectReader reader = new HaxeProjectReader(path);

            try
            {
                return reader.ReadProject();
            }
            catch (System.Xml.XmlException exception)
            {
                string format = string.Format("Error in XML Document line {0}, position {1}.",
                    exception.LineNumber, exception.LinePosition);
                throw new Exception(format, exception);
            }
            finally { reader.Close(); }
        }