管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-07-22 052c83d9d32880ed81110152d989705735f801bc
SimuTools/Domain/Extension.cs
@@ -1,4 +1,5 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -8,6 +9,9 @@
{
    public class Extension
    {
        [JsonIgnore]
        private static readonly object _obj = new object();
        public double minx { set; get; }
        public double miny { set; get; }
@@ -48,8 +52,11 @@
        public void SetHeight(double minHeight, double maxHeight)
        {
            this.minHeight = minHeight;
            this.maxHeight = maxHeight;
            lock (_obj)
            {
                if (this.minHeight > minHeight) this.minHeight = minHeight;
                if (this.maxHeight < maxHeight) this.maxHeight = maxHeight;
            }
        }
    }
}