From 052c83d9d32880ed81110152d989705735f801bc Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 22 七月 2024 16:16:46 +0800 Subject: [PATCH] 修改水面数据 --- SimuTools/Domain/Terrain.cs | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/SimuTools/Domain/Terrain.cs b/SimuTools/Domain/Terrain.cs index e212558..8b3b338 100644 --- a/SimuTools/Domain/Terrain.cs +++ b/SimuTools/Domain/Terrain.cs @@ -1,4 +1,5 @@ -锘縰sing System; +锘縰sing 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; + } } } -- Gitblit v1.9.3