Пример #1
0
        public override void ReadConfiguration(System.Xml.Linq.XElement Configuration)
        {
            base.ReadConfiguration(Configuration);

            if (Include)
            {
                var pFiles = Configuration.Element("ParticleFiles");
                UseUnsatFilter        = pFiles.SafeParseBool("RemoveUnsatParticles") ?? false;
                DrainToBoundaryOption = pFiles.SafeParseBool("DrainToBoundaryCorrection") ?? false;

                ParticlesPrSquareMeter = Configuration.SafeParseDouble("ParticlesPrSquareMeter") ?? -1;

                foreach (var parfile in pFiles.Elements("ParticleFile"))
                {
                    ParticleFiles.Add(new SafeFile()
                    {
                        FileName = parfile.SafeParseString("ShapeFileName")
                    });
                }

                Start = new DateTime(Configuration.SafeParseInt("FromYear") ?? 2000, Configuration.SafeParseInt("FromMonth") ?? 1, 1);
                End   = new DateTime(Configuration.SafeParseInt("ToYear") ?? 2002, Configuration.SafeParseInt("ToMonth") ?? 1, 1);

                OutputFile = new SafeFile()
                {
                    CheckIfFileExists = false, FileName = Configuration.SafeParseString("ShapeFileName")
                };
            }
        }