From 294b81166f21e12247e784d6bf404f5f34b2ee19 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期三, 19 二月 2025 12:51:14 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/Global.cs | 108 ++++-------------------------------------------------- 1 files changed, 8 insertions(+), 100 deletions(-) diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/Global.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/Global.cs index db8e3be..4d948ee 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/Global.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/Global.cs @@ -1,4 +1,4 @@ -锘縰sing Hydro.MapView; +锘� using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -8,9 +8,9 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; -using static Hydro.MapView.MapViewEnum; +using static Yw.WinFrmUI.Q3d.MapViewEnum; -namespace Hydro.MapView.Common +namespace Yw.WinFrmUI.Q3d { public static class Global @@ -50,18 +50,7 @@ return new Point((int)p.X, (int)p.Y); } } - public class MapOption - { - public float Link_multiply { get; set; } = 0.6667f; - public float junction_multiply { get; set; } = 1f; - public bool _ShowValve { get; set; } = true; - public bool _ShowJunction { get; set; } = true; - } - //public class AutoBuildParams - //{ - // public int MaxLevel; - // public int FloorHeigh; - //} + public static class GlobalExtension { @@ -71,16 +60,15 @@ { case MapObjectType.鍏ㄩ儴: return null; case MapObjectType.鑺傜偣: return typeof(JunctionViewModel); - case MapObjectType.姘磋〃:return typeof(MeterViewModel); + case MapObjectType.姘磋〃: return typeof(MeterViewModel); case MapObjectType.姘村簱: return typeof(ReservoirViewModel); case MapObjectType.姘存睜: return typeof(TankViewModel); case MapObjectType.鍠峰ご: return typeof(NozzleViewModel); case MapObjectType.绠$嚎: return typeof(PipeViewModel); case MapObjectType.闃�闂�: return typeof(ValveViewModel); - case MapObjectType.閲嶅鍣�: return typeof(RepeaterViewModel); + case MapObjectType.姘存车: return typeof(PumpViewModel); - case MapObjectType.闃�闂ㄧ偣: return typeof(ValveNodeViewModel); - case MapObjectType.姘存车鐐�: return typeof(PumpNodeViewModel); + default: return null; } @@ -105,6 +93,7 @@ } } + public class MapObjectRecord { public IBaseViewModel mapObject { get; set; } @@ -115,85 +104,4 @@ } - //public class message - //{ - // public static bool show(string caption, string content, MessageBoxButtons boxButtons = MessageBoxButtons.OKCancel) - // { - // var result = MessageBox.Show(content, caption, boxButtons, MessageBoxIcon.Information); - // if (result == DialogResult.OK || result == DialogResult.Yes) - // return true; - // else - // return false; - // } - //} - //public class Default - //{ - // static string _filePath = Path.Combine(Directory.GetCurrentDirectory(), @"default.ini"); - // //public static string JunctionPre = "J"; - // //public static string ReservoirPre = "R"; - // //public static string TankPre = "T"; - // //public static string PipePre = "P"; - // //public static string ValvePre = "V"; - // //public static string MeterPre = "M"; - // //public static string RepeaterPre = "Repeater"; - // public NodeViewModel junction; - // public ReservoirViewModel reservoir; - // public TankViewModel tank; - // public MeterViewModel meter; - // public NozzleViewModel nozzle; - // public LinkViewModel pipe; - // public ValveViewModel valve; - // public RepeaterViewModel repeater; - // public PumpViewModel pump; - // public static Default GetfaultINI() - // { - // StreamReader sr = new StreamReader(_filePath); - // string json = sr.ReadToEnd(); - // sr.Close(); - // return JsonConvert.DeserializeObject<Default>(json); - - // } - // public void SaveFile() - // { - // StreamWriter sw = new StreamWriter(_filePath); - // sw.WriteLine(JsonConvert.SerializeObject(this)); - // sw.Close(); - // } - - // public static Dictionary<MapObjectType, string> PreName = new Dictionary<MapObjectType, string>() - // { - // {MapObjectType.鑺傜偣,"J" }, - // {MapObjectType.姘村簱,"R" }, - // {MapObjectType.姘存睜,"T" }, - // {MapObjectType.姘磋〃,"M" }, - // {MapObjectType.鍠峰ご,"N" }, - // {MapObjectType.绠$嚎,"P" }, - // {MapObjectType.闃�闂�,"V" }, - // {MapObjectType.閲嶅鍣�,"Rp" }, - // {MapObjectType.姘存车,"Pump" }, - // {MapObjectType.闃�闂ㄧ偣,"Vn" }, - // }; - // public static string GetPreString(IBaseViewModel obj) - // { - // return PreName[obj.Type]; - // } - //} - - //public enum MouseState - //{ - // 鏃�, - // 鏂板鑺傜偣, - // 鏂板缓姘村簱, - // 鏂板缓姘存睜, - // 鏂板缓姘磋〃, - // 鏂板鍠峰ご, - // 鏂板绠$嚎, - - // 鏂板缓闃�闂�, - - // 鏂板缓閲嶅鍣�, - // 鏂板缓姘存车, - // 璁剧疆搴曞浘鑼冨洿, - - //} } -- Gitblit v1.9.3