コード例 #1
0
 public void CloseAllWnd()
 {
     foreach (UIWndData data in DBManager.m_DBUIWnd.GetUIWndData().Values)
     {
         UIBaseWnd wnd = UIBaseWnd.GetWndByName(data.WndName);
         if (wnd == null)
         {
             Debuger.LogWarning("CloseAllWnd is error=" + data.WndName);
         }
         else if (wnd.IsOpen())
         {
             wnd.CloseWnd();
         }
     }
 }
コード例 #2
0
        public bool OnlyHudOpen()
        {
            UIBaseWnd wnd = UIBaseWnd.GetWndByName("HUD");

            if (!wnd.IsOpen())
            {
                return(false);
            }

            foreach (UIBaseWnd data in UIBaseWnd.DicWnd.Values)
            {
                if (data.m_strWndName != "HUD")
                {
                    if (data.IsOpen())
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
コード例 #3
0
 /// <summary>
 ///关闭除HUD外的所有窗口
 /// </summary>
 public void CloseAllWndExceptHUD(string name)
 {
     foreach (UIWndData data in DBManager.m_DBUIWnd.GetUIWndData().Values)
     {
         UIBaseWnd wnd = UIBaseWnd.GetWndByName(data.WndName);
         if (wnd != null && !string.Equals(data.WndName, "HUD") && !string.Equals(data.WndName, name) && wnd.IsOpen())
         {
             wnd.CloseWnd();
         }
     }
 }