Пример #1
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();
         }
     }
 }
Пример #2
0
        public void SwitchWnd(string strWndName)
        {
            UIBaseWnd wnd = UIBaseWnd.GetWndByName(strWndName);

            if (wnd == null)
            {
                Debuger.LogError("Open Window " + strWndName + "fail!");
                return;
            }

            wnd.SwitchWnd();
        }
Пример #3
0
        public UIBaseWnd GetWnd(string strWndName)
        {
            UIBaseWnd wnd = UIBaseWnd.GetWndByName(strWndName);

            if (wnd == null)
            {
                Debuger.LogError("Get Window " + strWndName + "fail!");
                return(null);
            }

            return(wnd);
        }
Пример #4
0
        public void CloseWnd(string strWndName)
        {
            UIBaseWnd wnd = UIBaseWnd.GetWndByName(strWndName);

            if (wnd == null)
            {
                Debuger.LogError("Close Window " + strWndName + "fail!");
                return;
            }
            //Debuger.Log("CloseWnd " + strWndName);
            wnd.CloseWnd();
        }
Пример #5
0
        public void OpenWnd(string strWndName)
        {
            UIBaseWnd wnd = UIBaseWnd.GetWndByName(strWndName);

            if (wnd == null)
            {
                Debuger.LogError("Open Window " + strWndName + "fail!");
                return;
            }

            //if (GameApp.GetGuideManager() != null)
            //    GameApp.GetGuideManager().OpenWindow(strWndName);
            wnd.OpenWnd();
        }
Пример #6
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();
         }
     }
 }
Пример #7
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);
        }
Пример #8
0
        public void InitDBUIWnd()
        {
            Debuger.Log("DBManager.GetDBUIWnd().GetUIWndData().Count" + DBManager.m_DBUIWnd.GetUIWndData().Count);
            foreach (UIWndData data in DBManager.m_DBUIWnd.GetUIWndData().Values)
            {
                // Debuger.Log("DBManager.m_DBUIWnd.GetUIWndData().Count====" + DBManager.m_DBUIWnd.GetUIWndData().Count);
                //Debuger.Log("data.WndName====" + data.WndName);
                UIBaseWnd baseWnd = Assembly.GetExecutingAssembly().CreateInstance("ClashGame." + data.WndName) as UIBaseWnd;

                if (baseWnd != null)
                {
                    // 后面的覆盖前面的
                    if (UIBaseWnd.DicWnd.ContainsKey(data.WndName))
                    {
                        UIBaseWnd.DicWnd.Remove(data.WndName);
                    }

                    baseWnd.Init(data);
                    UIBaseWnd.DicWnd.Add(data.WndName, baseWnd);
                }
            }
        }