From be1dcb30e552fff6a2cf733d6577b103665edded Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期三, 11 十二月 2024 17:31:32 +0800
Subject: [PATCH] 增加能耗分析图片

---
 WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.Model.cs |  102 +++++++++++++++++++++++++--------------------------
 1 files changed, 50 insertions(+), 52 deletions(-)

diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.Model.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.Model.cs
index 6addf91..612c562 100644
--- a/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.Model.cs
+++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.Model.cs
@@ -1,8 +1,5 @@
 锘�//using CloudWaterNetwork.Magnifier;
 //using dict_py_Inner;
-using Yw.WinFrmUI.Q3d;
-
-
 using System;
 using System.Collections;
 using System.Collections.Generic;
@@ -20,13 +17,14 @@
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
-//using System.Windows.Forms.DataVisualization.Charting;
-using static Yw.WinFrmUI.Q3d.MapViewEnum;
+using Yw.WinFrmUI.Q3d;
 using static System.Net.Mime.MediaTypeNames;
 using static System.Windows.Forms.AxHost;
 using static System.Windows.Forms.LinkLabel;
 using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button;
 using static System.Windows.Forms.VisualStyles.VisualStyleElement.TrackBar;
+//using System.Windows.Forms.DataVisualization.Charting;
+using static Yw.WinFrmUI.Q3d.MapViewEnum;
 using Cursor = System.Windows.Forms.Cursor;
 
 namespace Yw.WinFrmUI.Q3d
@@ -40,7 +38,7 @@
 
         public MapDimensions mapOption = new MapDimensions();
 
-        public Settings newTemplate  = null;
+        public Settings newTemplate = null;
 
         public Settings settings = null;
 
@@ -55,7 +53,7 @@
         /// <summary>
         /// 鍦板浘閫夐」
         /// </summary>
-        public MapDimensions mapOption 
+        public MapDimensions mapOption
         {
             get { return TC.mapOption; }
             set { TC.mapOption = value; }
@@ -78,7 +76,7 @@
         [Browsable(false)]
         private Settings _Template
         {
-            get {return TC.settings; }
+            get { return TC.settings; }
             set
             {
                 TC.settings = value;
@@ -116,7 +114,7 @@
         bool _isDragging;
         bool _isRotating;
         bool _isPainting;
-        
+
 
         PointF mousePosition;
         // control+榧犳爣涓棿鎸変笅缂╂斁
@@ -152,14 +150,14 @@
         [Browsable(false)]
         public bool IsEditMode
         {
-            get { return this.mapOption?.isEditMode??true; }
+            get { return this.mapOption?.isEditMode ?? true; }
             set
             {
-                if (this.mapOption!=null) this.mapOption.isEditMode = value;
+                if (this.mapOption != null) this.mapOption.isEditMode = value;
             }
         }
 
-   
+
         [Browsable(false)]
         private float Link_multiply
         {
@@ -170,7 +168,7 @@
             }
             set
             {
-                if (_Template == null || _Template.mapOption == null) return;_Template.mapOption.Link_multiply = value;
+                if (_Template == null || _Template.mapOption == null) return; _Template.mapOption.Link_multiply = value;
             }
         }
         [Browsable(false)]
@@ -183,7 +181,7 @@
             }
             set
             {
-                if (_Template == null || _Template.mapOption == null) return;_Template.mapOption.junction_multiply = value;
+                if (_Template == null || _Template.mapOption == null) return; _Template.mapOption.junction_multiply = value;
             }
         }
         [DisplayName("鏄剧ず闃�闂�")]
@@ -197,7 +195,7 @@
             }
             set
             {
-                if (_Template == null || _Template.mapOption == null) return;_Template.mapOption._ShowValve = value;
+                if (_Template == null || _Template.mapOption == null) return; _Template.mapOption._ShowValve = value;
             }
         }
         [DisplayName("鏄剧ず鑺傜偣")]
@@ -210,8 +208,8 @@
             }
             set
             {
-                
-                if (_Template == null || _Template.mapOption == null) return;_Template.mapOption._ShowJunction = value;
+
+                if (_Template == null || _Template.mapOption == null) return; _Template.mapOption._ShowJunction = value;
             }
         }
         string _filePath
@@ -220,7 +218,7 @@
             {
                 if (string.IsNullOrEmpty(_Template?.filePath))
                     return null;
-				string path=_Template.filePath.TrimStart('\\');
+                string path = _Template.filePath.TrimStart('\\');
                 return
                     Path.Combine(Directory.GetCurrentDirectory(), path);
             }
@@ -243,15 +241,15 @@
         #endregion
         #region 绠$綉灞炴�э紙杈呭姪锛�
         [Browsable(false)]
-        public List<Q3DNodeCalcModel> _Nodes
+        public NodeViewModelList _Nodes
         {
-            get { return Network?.Nodes??new List<Q3DNodeCalcModel>(); }
+            get { return Network?.Nodes ?? new NodeViewModelList(); }
 
         }
         [Browsable(false)]
-        public List<Q3DLinkCalcModel> _Links
+        public LinkViewModelList _Links
         {
-            get { return Network?.Links??new List<Q3DLinkCalcModel>(); }
+            get { return Network?.Links ?? new LinkViewModelList(); }
 
         }
 
@@ -265,34 +263,34 @@
         #endregion
         #region 瑙嗚璁剧疆锛堣緟鍔╋級
 
-        
+
 
         private const float MinZoom = 0.1f;
         private const float MaxZoom = 1000.0f;
 
         [DisplayName("缂╂斁绯绘暟")]
-        public float zoom 
-        { 
+        public float zoom
+        {
             get
-            { 
+            {
                 return mapOption.zoom;
             }
             set
             {
                 ZoomChanged?.Invoke(this, zoom.ToString("0.000"));
-                mapOption.zoom = value; 
-            } 
+                mapOption.zoom = value;
+            }
         }
         [DisplayName("鏃嬭浆瑙掑害")]
-        private double Rotation 
+        private double Rotation
         {
             get
             {
-                return mapOption.rotation; 
-            } 
-            set 
+                return mapOption.rotation;
+            }
+            set
             {
-    
+
 
 
                 //灏嗘棆杞搴﹁浆鎹负-180~180
@@ -300,26 +298,26 @@
                 if (value > 180)
                     value -= 360;
                 else if (value < -180)
-                    value += 360;               
-                mapOption.rotation = value; 
-            } 
+                    value += 360;
+                mapOption.rotation = value;
+            }
         }
-        
+
         private double Rotation0 = 0;
         [Browsable(false)]
-        public PointF3D MapCenter 
-        { 
-            get 
+        public PointF3D MapCenter
+        {
+            get
             {
                 if (mapOption?.Center == null) return new PointF3D(0, 0, 0);
                 return mapOption.Center;
-            } 
-            set 
+            }
+            set
             {
                 //灏�$"{MapCenter.X.ToString("0.00")},{MapCenter.Y.ToString("0.00")}"閫氳繃CenterChanged浼犲嚭
                 CenterChanged?.Invoke(this, $"{MapCenter.X.ToString("0.00")},{MapCenter.Y.ToString("0.00")}");
                 mapOption.Center = value;
-            } 
+            }
         }
         private PointF3D MapCenter0;
         private bool is3Dview = false;
@@ -344,16 +342,16 @@
         /// 淇绾夸笌搴曢潰鐨勫す瑙掞紝鎶曞奖鐢╯in
         /// </summary>
         [DisplayName("淇瑙掑害")]
-        private double RotationF 
-        { 
-            get 
+        private double RotationF
+        {
+            get
             {
-                return mapOption.rotationF; 
-            } 
-            set 
-            { 
+                return mapOption.rotationF;
+            }
+            set
+            {
                 mapOption.rotationF = value;
-            } 
+            }
         }
         [Browsable(false)]
         private double 淇寮у害
@@ -410,7 +408,7 @@
                 return _Template?.Colours?.FirstOrDefault(cl => cl.isChoosed && cl.Type == mapOption.ColourLink);
             }
         }
-        
+
         //private bool __isOrtho = true;
 
         #endregion

--
Gitblit v1.9.3