From 5f397fffd6c50eac3ea98bad826e3e3be6c9cd4c Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期三, 21 十一月 2018 16:31:26 +0800
Subject: [PATCH] 3335【1.3】关闭子界面逻辑修改

---
 System/Skill/SkillPanel.cs |   34 ++++++----------------------------
 1 files changed, 6 insertions(+), 28 deletions(-)

diff --git a/System/Skill/SkillPanel.cs b/System/Skill/SkillPanel.cs
index f013715..544d52e 100644
--- a/System/Skill/SkillPanel.cs
+++ b/System/Skill/SkillPanel.cs
@@ -51,38 +51,21 @@
         {
             CloseChild();
             functionOrder = 1;
-            if (windowState == WindowState.Opened) {
-                WindowCenter.Instance.OpenWithoutAnimation<SkillPassWin>();
-            }
-            else {
-                WindowCenter.Instance.Open<SkillPassWin>();
-            }
+            WindowCenter.Instance.Open<SkillPassWin>();
         }
 
         private void OnTalentFunc()
         {
             CloseChild();
             functionOrder = 2;
-            if (windowState == WindowState.Opened)
-            {
-                WindowCenter.Instance.OpenWithoutAnimation<TalentWin>();
-            }
-            else
-            {
-                WindowCenter.Instance.Open<TalentWin>();
-            }
+            WindowCenter.Instance.Open<TalentWin>();
         }
 
         private void OnAccordFunc()
         {
             CloseChild();
             functionOrder = 0;
-            if (windowState == WindowState.Opened) {
-                WindowCenter.Instance.OpenWithoutAnimation<SkillAccordWin>();
-            }
-            else {
-                WindowCenter.Instance.Open<SkillAccordWin>();
-            }
+            WindowCenter.Instance.Open<SkillAccordWin>();
         }
 
         protected override void OnPreOpen()
@@ -129,15 +112,10 @@
 
         void CloseChild()
         {
-            if (WindowCenter.Instance.IsOpen<SkillAccordWin>()) {
-                WindowCenter.Instance.CloseImmediately<SkillAccordWin>();
-            }
-            if (WindowCenter.Instance.IsOpen<SkillPassWin>()) {
-                WindowCenter.Instance.CloseImmediately<SkillPassWin>();
-            }
-            if (WindowCenter.Instance.IsOpen<TalentWin>())
+            var children = WindowConfig.Get().FindChildWindows("SkillPanel");
+            foreach (var window in children)
             {
-                WindowCenter.Instance.CloseImmediately<TalentWin>();
+                WindowCenter.Instance.Close(window);
             }
         }
     }

--
Gitblit v1.8.0