From fab5d6e30b9a42a1f94524fca74ef227d2c963e4 Mon Sep 17 00:00:00 2001
From: cloudflight <cloudflight@126.com>
Date: 星期六, 20 七月 2024 11:12:32 +0800
Subject: [PATCH] 1

---
 Hydraulic/Hydro.MapUI/Map/map_old.Model.cs |  233 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 233 insertions(+), 0 deletions(-)

diff --git a/Hydraulic/Hydro.MapUI/Map/map_old.Model.cs b/Hydraulic/Hydro.MapUI/Map/map_old.Model.cs
new file mode 100644
index 0000000..7db6e7a
--- /dev/null
+++ b/Hydraulic/Hydro.MapUI/Map/map_old.Model.cs
@@ -0,0 +1,233 @@
+锘�//using CloudWaterNetwork.Magnifier;
+//using dict_py_Inner;
+using Hydro.MapView;
+using Hydro.MapView.Base;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Data.Common;
+using System.Diagnostics;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Numerics;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Security.Cryptography;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+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 Cursor = System.Windows.Forms.Cursor;
+
+namespace Hydro.MapUI
+{
+    public partial class empty
+    {
+
+    }
+    public partial class MapViewer_Old
+    {
+
+        #region 鏂板绠$綉
+        public Template _newTemplate { get; set; } = new Template();
+        MapViewNetWork _NewNet
+        {
+            get
+            {
+                if (_newTemplate.network == null) _newTemplate.network = new MapViewNetWork(); 
+                return _newTemplate.network;
+            }
+        }
+        #endregion
+
+        #region 灞炴��
+
+
+        private string _StartPoint = null;
+        private string _EndPoint = null;
+        private bool __isEditMode = true;
+        public bool _IsEditMode
+        {
+            get { return __isEditMode; }
+            set
+            {
+                __isEditMode = value;
+                toolStripComboBox_娴忚妯″紡.Text = __isEditMode ? "缂栬緫妯″紡" : "娴忚妯″紡";
+            }
+        }
+
+        private Template __template = null;
+        private Template _Template
+        {
+            get { return __template; }
+            set
+            {
+                __template = value;
+            
+                label_file.Text = __template==null?"": __template.filePath;
+            }
+        }
+        public float Link_multiply
+        {
+            get
+            {
+                if (_Template == null || _Template.mapOption == null) return 1.0f;
+                return _Template.mapOption.Link_multiply;
+            }
+            set
+            {
+                if (_Template == null || _Template.mapOption == null) return;
+                _Template.mapOption.Link_multiply = value;
+            }
+        }
+        public float junction_multiply
+        {
+            get
+            {
+                if (_Template == null || _Template.mapOption == null) return 1.0f;
+                return _Template.mapOption.junction_multiply;
+            }
+            set
+            {
+                if (_Template == null || _Template.mapOption == null) return;
+                _Template.mapOption.junction_multiply = value;
+            }
+        }
+        public bool _ShowValve
+        {
+            get
+            {
+                if (_Template == null || _Template.mapOption == null) return true;
+                return _Template.mapOption._ShowValve;
+            }
+            set
+            {
+                _Template.mapOption._ShowValve = value;
+            }
+        }
+        public bool _ShowJunction
+        {
+            get
+            {
+                if (_Template == null || _Template.mapOption == null) return true;
+                return _Template.mapOption._ShowJunction;
+            }
+            set
+            {
+                _Template.mapOption._ShowJunction = value;
+            }
+        }
+        string _filePath
+        {
+            get
+            {
+                if (string.IsNullOrEmpty(_Template?.filePath))
+                    return null;
+                return
+                    Path.Combine(Directory.GetCurrentDirectory(), _Template.filePath);
+            }
+            //set 
+            //{
+
+            //    _Template.璺緞 = value; 
+            //} 
+        }
+        private MapViewNetWork _Network
+        {
+            get
+            {
+                return _Template?.network;
+            }
+        }
+
+
+        public List<NodeViewModel> _Nodes
+        {
+            get { return _Network?.Nodes??new List<NodeViewModel>(); }
+
+        }
+
+        public List<LinkViewModel> _Links
+        {
+            get { return _Network?.Links??new List<LinkViewModel>(); }
+
+        }
+
+        private List<Area> _areas = new List<Area>();
+        public List<Area> _Areas
+        {
+            get { return _areas; }
+
+        }
+        #endregion
+
+
+        #region 鍩虹鍦板浘瑙嗗浘閫夐」
+
+        MapDimensions mapOption = new MapDimensions();
+        MapDimensions mapOption0 = new MapDimensions();
+
+        private const float MinZoom = 0.1f;
+        private const float MaxZoom = 1000.0f;
+
+
+        public float zoom { get { return mapOption.zoom; }set { mapOption.zoom = value; } } 
+        public double Rotation { get { return mapOption.rotation; } set { mapOption.rotation = value; } }
+        private double Rotation0 = 0;
+        public PointF MapCenter { get { return mapOption.Center; } set { mapOption.Center = value; } }
+        private PointF MapCenter0;
+        private bool is3Dview = false;
+        double 淇瑙掑害_start = 90;
+     
+        /// <summary>
+        /// 淇绾夸笌搴曢潰鐨勫す瑙掞紝鎶曞奖鐢╯in
+        /// </summary>
+
+        public double RotationF 
+        { 
+            get {
+                if (Lock2DView) mapOption.rotationF = 90;
+                
+                return mapOption.rotationF; 
+            } 
+            set { 
+                mapOption.rotationF = value;
+                if (Lock2DView) mapOption.rotationF = 90;
+            } 
+        }
+       
+        public double 淇寮у害
+        {
+            get
+            {
+                return RotationF / 180 * Math.PI;
+            }
+        }
+
+
+        public PointF Zoom
+        {
+            get
+            {
+                return new PointF(zoom, -zoom);
+            }
+        }
+
+
+        private PointF Z(float z)
+        {
+            return new PointF(0, 0);
+        }
+        #endregion
+
+
+    }
+}

--
Gitblit v1.9.3