管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-07-18 5841423dd021e2d070cff5d3cbca8849ae89fa93
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
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
    {
        private List<int[]> size { set; get; }
 
        public Terrain()
        {
            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))
                {
                    size.Add(new int[] { i, i });
                }
            }
        }
 
        public Terrain(List<int[]> size)
        {
            this.size = size;
        }
    }
}