From 20b138393ab0d441ee6b9e9b1cedbf1d22a2c00c Mon Sep 17 00:00:00 2001
From: qin <a@163.com>
Date: 星期一, 06 五月 2024 14:55:46 +0800
Subject: [PATCH] 冲突解决

---
 Hydraulic/Hydro.MapUI/Map/MapViewer.Model.cs |   45 +++++++++++++++++++++++++++++++++++++++------
 1 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/Hydraulic/Hydro.MapUI/Map/MapViewer.Model.cs b/Hydraulic/Hydro.MapUI/Map/MapViewer.Model.cs
index 242304c..6b08526 100644
--- a/Hydraulic/Hydro.MapUI/Map/MapViewer.Model.cs
+++ b/Hydraulic/Hydro.MapUI/Map/MapViewer.Model.cs
@@ -39,11 +39,12 @@
 
         #region 鏂板绠$綉
         [Browsable(false)]
-        public Template _newTemplate { get; set; } = new Template();
+        public Template _newTemplate { get; set; } = null;// new Template();
         MapViewNetWork _NewNet
         {
             get
             {
+                if (_newTemplate==null) _newTemplate = new Template();
                 if (_newTemplate.network == null) _newTemplate.network = new MapViewNetWork(); 
                 return _newTemplate.network;
             }
@@ -189,13 +190,43 @@
         private const float MaxZoom = 1000.0f;
 
         [DisplayName("缂╂斁绯绘暟")]
-        public float zoom { get { return mapOption.zoom; }set { mapOption.zoom = value; } }
+        public float zoom 
+        { 
+            get
+            { 
+                return mapOption.zoom;
+            }
+            set
+            { 
+                mapOption.zoom = value; 
+            } 
+        }
         [DisplayName("鏃嬭浆瑙掑害")]
-        public double Rotation { get { return mapOption.rotation; } set { mapOption.rotation = value; } }
+        public double Rotation 
+        {
+            get
+            {
+                return mapOption.rotation; 
+            } 
+            set 
+            { 
+                mapOption.rotation = value; 
+            } 
+        }
         
         private double Rotation0 = 0;
         [Browsable(false)]
-        public PointF MapCenter { get { return mapOption.Center; } set { mapOption.Center = value; } }
+        public PointF MapCenter 
+        { 
+            get 
+            { 
+                return mapOption.Center; 
+            } 
+            set 
+            { 
+                mapOption.Center = value; 
+            } 
+        }
         private PointF MapCenter0;
         private bool is3Dview = false;
         double 淇瑙掑害_start = 90;
@@ -206,13 +237,15 @@
         [DisplayName("淇瑙掑害")]
         public double RotationF 
         { 
-            get {
+            get 
+            {
                 if (Lock2DView) 
                     mapOption.rotationF = 90;
                 
                 return mapOption.rotationF; 
             } 
-            set { 
+            set 
+            { 
                 
                 if (Lock2DView) 
                     mapOption.rotationF = 90;

--
Gitblit v1.9.3