From 3b50d06d004ecc31df7ecaa57927fa35c1ea608e Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期日, 28 四月 2019 16:59:23 +0800
Subject: [PATCH] 3335 修改界面功能框架。

---
 System/WindowBase/Window.cs |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/System/WindowBase/Window.cs b/System/WindowBase/Window.cs
index 862711b..3a90bf5 100644
--- a/System/WindowBase/Window.cs
+++ b/System/WindowBase/Window.cs
@@ -72,15 +72,24 @@
             {
                 windowTimer = 0f;
                 var parentName = string.Empty;
-                if (WindowConfig.Get().FindParentWindow(this.gameObject.name, out parentName))
+                if (WindowConfig.FindParentWindow(this.gameObject.name, out parentName))
                 {
                     var parentWindow = WindowCenter.Instance.Get(parentName);
-                    if (parentWindow != null)
+                    if (parentWindow is OneLevelWin)
+                    {
+                        parent = (parentWindow as OneLevelWin).subWindowContainer;
+                    }
+                    else
                     {
                         parent = parentWindow.transform as RectTransform;
+                    }
+
+                    if (parent != null)
+                    {
                         rectTransform.MatchWhith(parent);
                     }
                 }
+
                 OnPreOpen();
                 WindowCenter.Instance.NotifyBeforeOpen(this);
             }
@@ -450,11 +459,11 @@
 
             try
             {
-                var isChildWindow = WindowConfig.Get().IsChildWindow(this.gameObject.name);
+                var isChildWindow = WindowConfig.IsChildWindow(this.gameObject.name);
                 if (isChildWindow)
                 {
                     var parentName = string.Empty;
-                    WindowConfig.Get().FindParentWindow(this.gameObject.name, out parentName);
+                    WindowConfig.FindParentWindow(this.gameObject.name, out parentName);
                     var parentWindow = WindowCenter.Instance.Get(parentName);
                     if (parentWindow != null && parentWindow.executedActiveWindow)
                     {
@@ -466,7 +475,7 @@
                 {
                     OnActived();
                     executedActiveWindow = true;
-                    var childWindows = WindowConfig.Get().FindChildWindows(this.gameObject.name);
+                    var childWindows = WindowConfig.GetChildWindows(this.gameObject.name);
                     var isParentWindow = childWindows != null;
                     if (isParentWindow)
                     {

--
Gitblit v1.8.0