From 0a2c59670b82d61d3fa79f51a54e82e7bd0134c4 Mon Sep 17 00:00:00 2001
From: tangxu <tangxu76880903>
Date: 星期一, 25 十一月 2024 13:29:14 +0800
Subject: [PATCH] 优化生成

---
 WinFrmUI/DPumpHydr.WinFrmUI.RLT/Docking/Crown/CrownDockPanel.cs |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.RLT/Docking/Crown/CrownDockPanel.cs b/WinFrmUI/DPumpHydr.WinFrmUI.RLT/Docking/Crown/CrownDockPanel.cs
index 80a9994..aa63dcf 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.RLT/Docking/Crown/CrownDockPanel.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.RLT/Docking/Crown/CrownDockPanel.cs
@@ -118,7 +118,7 @@
             Regions = new Dictionary<DockArea, CrownDockRegion>();
             _contents = new List<CrownDockContent>();
 
-            BackColor = ThemeProvider.Theme.Colors.GreyBackground;
+            BackColor = System.Drawing.Color.White;// ThemeProvider.Theme.Colors.GreyBackground;
 
             CreateRegions();
         }
@@ -153,12 +153,27 @@
             }
 
             CrownDockRegion region = Regions[dockContent.DockArea];
+            if(dockContent.DockArea == DockArea.Right)
+            {
+                region.Width = RightDockWidth;
+            }
+            if (dockContent.DockArea == DockArea.Left )
+            {
+                region.Width = LeftDockWidth;
+            }
+            if(dockContent.DockArea == DockArea.Bottom)
+            {
+                region.Height = BottomDockHeight;
+            }
             region.AddContent(dockContent, dockGroup);
 
             ContentAdded?.Invoke(this, new DockContentEventArgs(dockContent));
 
             dockContent.Select();
         }
+        public int RightDockWidth { get; set; } = 310;
+        public int LeftDockWidth { get; set; } = 220;
+        public int BottomDockHeight { get; set; } = 200;
 
         public void InsertContent(CrownDockContent dockContent, CrownDockGroup dockGroup, DockInsertType insertType)
         {
@@ -218,6 +233,7 @@
             Regions.Add(DockArea.Right, rightRegion);
 
             CrownDockRegion bottomRegion = new(this, DockArea.Bottom);
+   
             Regions.Add(DockArea.Bottom, bottomRegion);
 
             // Add the regions in this order to force the bottom region to be positioned

--
Gitblit v1.9.3