管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-07-22 052c83d9d32880ed81110152d989705735f801bc
SimuTools/Domain/Terrain.cs
@@ -1,4 +1,5 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
@@ -11,9 +12,15 @@
    {
        public List<int[]> size { set; get; }
        [JsonIgnore]
        public double minHeight { set; get; }
        [JsonIgnore]
        public double maxHeight { set; get; }
        public Terrain()
        {
            size = new List<int[]>();
            this.size = new List<int[]>();
            string str = ConfigurationManager.AppSettings["sizes"];
            if (string.IsNullOrEmpty(str)) return;
@@ -24,7 +31,7 @@
                int i;
                if (int.TryParse(s, out i))
                {
                    size.Add(new int[] { i, i });
                    this.size.Add(new int[] { i, i });
                }
            }
        }
@@ -33,5 +40,11 @@
        {
            this.size = size;
        }
        public void SetHeight(double minHeight, double maxHeight)
        {
            this.minHeight = minHeight;
            this.maxHeight = maxHeight;
        }
    }
}