| | |
| | | //using CloudWaterNetwork.Magnifier; |
| | | //using dict_py_Inner; |
| | | |
| | | using Hydro.Core.Model; |
| | | using Hydro.MapView; |
| | | using Hydro.MapView.Base; |
| | |
| | | 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 |
| | | { |
| | | |
| | |
| | | get {return TC.template; } |
| | | set |
| | | { |
| | | TC.template = value; |
| | | |
| | | label_file.Text = TC.template?.filePath; |
| | | TC.template = value; |
| | | } |
| | | } |
| | | |
| | |
| | | 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>(); |
| | | |
| | |
| | | } |
| | | set |
| | | { |
| | | label_zoom.Text = $"Zoom:{zoom.ToString("0.000")}"; |
| | | if (OnChangeViewZoom != null) |
| | | { |
| | | OnChangeViewZoom.Invoke(zoom); |
| | | } |
| | | mapOption.zoom = value; |
| | | } |
| | | } |
| | |
| | | } |
| | | set |
| | | { |
| | | toolStripStatusLabel_rotation.Text = $"Rotation:({Rotation.ToString("0")},{RotationF.ToString("0")})"; |
| | | if (OnChangeViewRotation != null) |
| | | { |
| | | OnChangeViewRotation.Invoke(Rotation, RotationF); |
| | | } |
| | | mapOption.rotation = value; |
| | | } |
| | | } |
| | |
| | | } |
| | | set |
| | | { |
| | | label_center.Text = $"center:({MapCenter.X.ToString("0.00")} ,{MapCenter.Y.ToString("0.00")})"; |
| | | if (OnChangeViewCenter != null) |
| | | { |
| | | OnChangeViewCenter.Invoke(MapCenter); |
| | | } |
| | | mapOption.Center = value; |
| | | } |
| | | } |
| | |
| | | return _Template?.Colours?.FirstOrDefault(cl => cl.isChoosed && cl.Type == mapOption.ColourLink); |
| | | } |
| | | } |
| | | |
| | | |
| | | //private bool __isOrtho = true; |
| | | |
| | | #endregion |
| | | #region 正交模式 |
| | | public Action<bool> OnChangeViewOrtho = null; |
| | | private bool _isOrtho |
| | | { |
| | | get |
| | |
| | | set |
| | | { |
| | | mapOption.IsOrtho = value; |
| | | if (mapOption.IsOrtho) |
| | | if(OnChangeViewOrtho != null) |
| | | { |
| | | label_ZZ.Text = "正交模式:开"; |
| | | OnChangeViewOrtho.Invoke(mapOption.IsOrtho); |
| | | } |
| | | else |
| | | { |
| | | label_ZZ.Text = "正交模式:关"; |
| | | } |
| | | |
| | | } |
| | | } |
| | | #endregion |