From 390e6424a3278430a73476034592c24b17fe23ba Mon Sep 17 00:00:00 2001 From: tangxu <tangxu76880903> Date: 星期一, 06 五月 2024 20:00:05 +0800 Subject: [PATCH] 去掉Viewer的状态栏,移到Ribbon里面 --- WinfrmUI/Hydro.WinfrmUI.Browser/Viewer.Model.cs | 31 ++++++++++++++++++------------- 1 files changed, 18 insertions(+), 13 deletions(-) diff --git a/WinfrmUI/Hydro.WinfrmUI.Browser/Viewer.Model.cs b/WinfrmUI/Hydro.WinfrmUI.Browser/Viewer.Model.cs index 2af07f6..4ba7fd1 100644 --- a/WinfrmUI/Hydro.WinfrmUI.Browser/Viewer.Model.cs +++ b/WinfrmUI/Hydro.WinfrmUI.Browser/Viewer.Model.cs @@ -78,9 +78,7 @@ get {return TC.template; } set { - TC.template = value; - - label_file.Text = TC.template?.filePath; + TC.template = value; } } @@ -274,7 +272,10 @@ } set { - label_zoom.Text = $"Zoom锛歿zoom.ToString("0.000")}"; + if (OnChangeViewZoom != null) + { + OnChangeViewZoom.Invoke(zoom); + } mapOption.zoom = value; } } @@ -287,7 +288,10 @@ } set { - toolStripStatusLabel_rotation.Text = $"Rotation锛�({Rotation.ToString("0")}锛寋RotationF.ToString("0")})"; + if (OnChangeViewRotation != null) + { + OnChangeViewRotation.Invoke(Rotation, RotationF); + } mapOption.rotation = value; } } @@ -302,7 +306,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 +386,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 +401,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