예제 #1
0
        public void AddInputFileRecord(Nullable <int> iteration, Nullable <int> timestep, string polygonFile, string habitatFile)
        {
            InputFileRecord r = this.m_Map.GetItemExact(iteration, timestep);

            if (r != null)
            {
                string s = string.Format(CultureInfo.InvariantCulture,
                                         "There is already an input file record for iteration {0} and timestep {1}", iteration, timestep);

                throw new ArgumentException(s);
            }

            this.m_Map.AddItem(iteration, timestep, new InputFileRecord(polygonFile, habitatFile));
        }
예제 #2
0
        private string GetInputFile(int iteration, int timestep, bool polygonFile)
        {
            InputFileRecord r = this.m_InputFileMap.GetInputFileRecord(iteration, timestep);

            if (r == null)
            {
                return(null);
            }
            else
            {
                string folder = this.Library.GetFolderName(LibraryFolderType.Input, this.m_InputFiles, false);

                if (polygonFile)
                {
                    return(Path.Combine(folder, r.PolygonFile));
                }
                else
                {
                    return(Path.Combine(folder, r.HabitatFile));
                }
            }
        }