Exemplo n.º 1
0
        public GhgManager(byte[] ghgData, string filePath)
        {
            //validate it
            if (ghgData != null)
            {
                if (ghgData.Length > 0)
                {
                    //attempt to load the GHG modeling format
                    var ghgModel = GhgFile.FromRawBytes(ghgData, filePath);

                    //validate it
                    if (ghgModel != null)
                    {
                        ComplexModel = ghgModel;
                    }
                }
            }
        }
Exemplo n.º 2
0
        public GhgManager(string filePath)
        {
            if (File.Exists(filePath))
            {
                //read in the entire GHG file
                var fileData = File.ReadAllBytes(filePath);

                //validate it
                if (fileData.Length > 0)
                {
                    //attempt to load the GHG modeling format
                    var ghgModel = GhgFile.FromRawBytes(fileData, filePath);

                    //validate it
                    if (ghgModel != null)
                    {
                        ComplexModel = ghgModel;
                    }
                }
            }
        }