管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-07-22 052c83d9d32880ed81110152d989705735f801bc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace SimuTools.Domain
{
    public class Terrain
    {
        public List<int[]> size { set; get; }
 
        [JsonIgnore]
        public double minHeight { set; get; }
 
        [JsonIgnore]
        public double maxHeight { set; get; }
 
        public Terrain()
        {
            this.size = new List<int[]>();
 
            string str = ConfigurationManager.AppSettings["sizes"];
            if (string.IsNullOrEmpty(str)) return;
 
            string[] strs = str.Split(',');
            foreach (string s in strs)
            {
                int i;
                if (int.TryParse(s, out i))
                {
                    this.size.Add(new int[] { i, i });
                }
            }
        }
 
        public Terrain(List<int[]> size)
        {
            this.size = size;
        }
 
        public void SetHeight(double minHeight, double maxHeight)
        {
            this.minHeight = minHeight;
            this.maxHeight = maxHeight;
        }
    }
}