From 215965cada89ff0f5fd5acebbfe091585dc1b9c4 Mon Sep 17 00:00:00 2001 From: cloudflight <cloudflight@126.com> Date: 星期三, 08 五月 2024 10:40:51 +0800 Subject: [PATCH] 提交2024年5月8日 --- WinfrmUI/Hydro.WinfrmUI.Browser/Viewer.Model.cs | 39 +++++++++++++++++++++------------------ 1 files changed, 21 insertions(+), 18 deletions(-) diff --git a/WinfrmUI/Hydro.WinfrmUI.Browser/Viewer.Model.cs b/WinfrmUI/Hydro.WinfrmUI.Browser/Viewer.Model.cs index 2af07f6..9794ac2 100644 --- a/WinfrmUI/Hydro.WinfrmUI.Browser/Viewer.Model.cs +++ b/WinfrmUI/Hydro.WinfrmUI.Browser/Viewer.Model.cs @@ -1,5 +1,4 @@ -锘�//using CloudWaterNetwork.Magnifier; -//using dict_py_Inner; +锘� using Hydro.Core.Model; using Hydro.MapView; using Hydro.MapView.Base; @@ -27,8 +26,7 @@ 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.WinfrmUI { @@ -78,9 +76,7 @@ get {return TC.template; } set { - TC.template = value; - - label_file.Text = TC.template?.filePath; + TC.template = value; } } @@ -121,7 +117,7 @@ bool _isInsertingObject = false; bool _isMovingObject = false; bool _isPastingObject = false; - Cursor _lastCursor; + System.Windows.Forms.Cursor _lastCursor; object _undoOldValue = null; private List<PointF> polygonPoints = new List<PointF>(); @@ -274,7 +270,10 @@ } set { - label_zoom.Text = $"Zoom锛歿zoom.ToString("0.000")}"; + if (OnChangeViewZoom != null) + { + OnChangeViewZoom.Invoke(zoom); + } mapOption.zoom = value; } } @@ -287,7 +286,10 @@ } set { - toolStripStatusLabel_rotation.Text = $"Rotation锛�({Rotation.ToString("0")}锛寋RotationF.ToString("0")})"; + if (OnChangeViewRotation != null) + { + OnChangeViewRotation.Invoke(Rotation, RotationF); + } mapOption.rotation = value; } } @@ -302,7 +304,10 @@ } set { - label_center.Text = $"center锛�({MapCenter.X.ToString("0.00")} 锛寋MapCenter.Y.ToString("0.00")}锛�"; + if (OnChangeViewCenter != null) + { + OnChangeViewCenter.Invoke(MapCenter); + } mapOption.Center = value; } } @@ -379,11 +384,12 @@ return _Template?.Colours?.FirstOrDefault(cl => cl.isChoosed && cl.Type == mapOption.ColourLink); } } - + //private bool __isOrtho = true; #endregion #region 姝d氦妯″紡 + public Action<bool> OnChangeViewOrtho = null; private bool _isOrtho { get @@ -393,14 +399,11 @@ set { mapOption.IsOrtho = value; - if (mapOption.IsOrtho) + if(OnChangeViewOrtho != null) { - label_ZZ.Text = "姝d氦妯″紡:寮�"; + OnChangeViewOrtho.Invoke(mapOption.IsOrtho); } - else - { - label_ZZ.Text = "姝d氦妯″紡:鍏�"; - } + } } #endregion -- Gitblit v1.9.3