From 375b488be2666cd56e70728624f4eadaefee0440 Mon Sep 17 00:00:00 2001
From: chenghaoran <chenghaoran@ipilotwhale.com>
Date: 星期二, 12 三月 2024 17:36:49 +0800
Subject: [PATCH] 优化项目结构;

---
 WPFProject/Utils/Resize.cs |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/Utils/Resize.cs b/WPFProject/Utils/Resize.cs
similarity index 99%
rename from Utils/Resize.cs
rename to WPFProject/Utils/Resize.cs
index bbc5615..bafa586 100644
--- a/Utils/Resize.cs
+++ b/WPFProject/Utils/Resize.cs
@@ -420,13 +420,13 @@
                             double oldLeft = double.IsNaN(Canvas.GetLeft(target)) ? 0 : Canvas.GetLeft(target),
                                 oldTop = double.IsNaN(Canvas.GetTop(target)) ? 0 : Canvas.GetTop(target),
                                 oldWidth = double.IsNaN(target.ActualWidth) ? 0 : target.ActualWidth,
-                                oldHeight = double.IsNaN(target.ActualHeight) ? 0 : target.ActualHeight;
+                                oldHeight = double.IsNaN(target.ActualHeight) ? 0 : target.ActualHeight;
 
                             double left, top, width, height;
                             double x = e.HorizontalChange, y = e.VerticalChange;
-                            bool toLeft = x < 0, toTop = y < 0;
-                            bool isLeft = thumb.HorizontalAlignment == HorizontalAlignment.Left,
-                                isTop = thumb.VerticalAlignment == VerticalAlignment.Top;
+                            bool toLeft = x < 0, toTop = y < 0;
+                            bool isLeft = thumb.HorizontalAlignment == HorizontalAlignment.Left,
+                                isTop = thumb.VerticalAlignment == VerticalAlignment.Top;
                             if (isLeft)
                             {
                                 // 宸︿晶鐨勬嫋鎷�
@@ -461,33 +461,33 @@
                                 if (top + height > parent.ActualHeight) height = parent.ActualHeight - top;
                             }
 
-                            if (thumb.HorizontalAlignment != HorizontalAlignment.Center &&
+                            if (thumb.HorizontalAlignment != HorizontalAlignment.Center &&
                                 thumb.HorizontalAlignment != HorizontalAlignment.Stretch)
                             {
                                 // 姘村钩鏂瑰悜鏈�缁堝垽鏂�
                                 Canvas.SetLeft(target, left);
                                 target.Width = width;
-                                //if ((isLeft && toLeft && left >= 0) ||
-                                //    (isLeft && !toLeft && width >= MinWidth) ||
-                                //    (!isLeft && toLeft && width >= MinWidth) ||
-                                //    (!isLeft && !toLeft && (left + width) <= parent.ActualWidth))
-                                //{
+                                //if ((isLeft && toLeft && left >= 0) ||
+                                //    (isLeft && !toLeft && width >= MinWidth) ||
+                                //    (!isLeft && toLeft && width >= MinWidth) ||
+                                //    (!isLeft && !toLeft && (left + width) <= parent.ActualWidth))
+                                //{
                                 //    Canvas.SetLeft(target, left);
                                 //    target.Width = width;
                                 //}
                             }
 
-                            if (thumb.VerticalAlignment != VerticalAlignment.Center &&
+                            if (thumb.VerticalAlignment != VerticalAlignment.Center &&
                                 thumb.VerticalAlignment != VerticalAlignment.Stretch)
                             {
                                 // 鍨傜洿鏂瑰悜鏈�缁堝垽鏂�
-                                Canvas.SetTop(target, top);
+                                Canvas.SetTop(target, top);
                                 target.Height = height;
-                                //if ((isTop && toTop && top >= 0) ||
-                                //    (isTop && !toTop && height >= MinHeight) ||
-                                //    (!isTop && toTop && height >= MinHeight) ||
-                                //    (!isTop && !toTop && (top + height) <= parent.ActualHeight))
-                                //{
+                                //if ((isTop && toTop && top >= 0) ||
+                                //    (isTop && !toTop && height >= MinHeight) ||
+                                //    (!isTop && toTop && height >= MinHeight) ||
+                                //    (!isTop && !toTop && (top + height) <= parent.ActualHeight))
+                                //{
                                 //    Canvas.SetTop(target, top);
                                 //    target.Height = height;
                                 //}

--
Gitblit v1.9.1