Esempio n. 1
0
        //----------------------------------------------------------------------------
        private static UIHistoryData AddPanel(string key, object arg, eUIImpower impower = eUIImpower.Default)
        {
            if (winKey == "")
            {
                return(null);
            }
            Dictionary <string, UIHistoryData> dict;

            panelDicts.TryGetValue(winKey, out dict);
            if (dict == null)
            {
                dict = new Dictionary <string, UIHistoryData>();
                panelDicts.Add(winKey, dict);
            }

            UIHistoryData uiHistoryData = null;

            dict.TryGetValue(key, out uiHistoryData);
            if (uiHistoryData == null)
            {
                uiHistoryData = new UIHistoryData();
                dict.Add(key, uiHistoryData);
            }
            uiHistoryData.UpdateData(key, arg, impower);
            return(uiHistoryData);
        }
Esempio n. 2
0
        //----------------------------------------------------------------------------
        private static UIHistoryData AddWindow(string key, object arg, eUIImpower impower = eUIImpower.Default)
        {
            winKey = key;
            UIHistoryData uiHistoryData;

            ctrlDicts.TryGetValue(key, out uiHistoryData);
            if (uiHistoryData == null)
            {
                uiHistoryData = new UIHistoryData();
                ctrlDicts.Add(key, uiHistoryData);
            }
            else
            {
                Dictionary <string, UIHistoryData> dict;
                panelDicts.TryGetValue(key, out dict);
                if (dict != null)
                {
                    dict.Clear();
                    dict            = null;
                    panelDicts[key] = null;
                    panelDicts.Remove(key);
                }
            }

            uiHistoryData.UpdateData(key, arg, impower);
            return(uiHistoryData);
        }
Esempio n. 3
0
        //----------------------------------------------------------------------------
        static public void Show(string key, object arg, eUIImpower impower = eUIImpower.Default)
        {
            if (key != "UIErrorCtrl" &&
                key != "UIEffectCtrl" &&
                key != "UIItemGetCtrl" &&
                key != "UIMonthCardCtrl" &&
                key != "UDisConnectionCtrl" &&
                key != "UIDialogToggleCtrl" &&
                key != "UICircleCtrl" &&
                key != "UIChatSimpleViewOldCtrl" &&
                key != "UIPlayerUpgradeCtrl" &&
                key != "UIGuideVeteranModeCtrl" &&
                key != "UIChatSimpleCtrl" &&
                key != "UIAdvertisingCtrl" &&
                key != "UINewPlayerRewardCtrl" &&
                key != "UILoopLoginRewardPanelCtrl")
            {
                if (allShowUI.IndexOf(key) == -1)
                {
                    allShowUI.Add(key);
                }
                else
                {
                    allShowUI.Remove(key);
                    allShowUI.Add(key);
                }
            }

            switch (impower)
            {
            case eUIImpower.Window:
                if (winKey != "" && winKey != key)
                {
                    Messenger.Broadcast(DgMsgID.DgUI_HideLastUI, winKey);
                }
                int index = uiQuene.IndexOf(key);
                if (index > -1)
                {
                    uiQuene.RemoveAt(index);
                }
                uiQuene.Add(key);
                AddWindow(key, arg, impower);
                showList.Clear();
                break;

            case eUIImpower.Panel:
                AddPanel(key, arg, impower);
                break;

            case eUIImpower.Default:
                return;

            default:
                break;
            }
            if (!showList.Contains(key))
            {
                showList.Add(key);
            }
        }
Esempio n. 4
0
        //----------------------------------------------------------------------------
        public TCtrl Register <TCtrl, TBase>(string strAssetID, IMsgPipe pipe, bool bLocal = true, eUIImpower _impower = eUIImpower.Default)
            where TCtrl : UIController, new()
            where TBase : UIBase, new()
        {
            UISystem system = GetUISystem();

            if (system.HasUIClass(strAssetID))
            {
                return(default);
Esempio n. 5
0
 public void UpdateData(string _key, object _data, eUIImpower _impower)
 {
     key     = _key;
     data    = _data;
     impower = _impower;
 }
Esempio n. 6
0
        //----------------------------------------------------------------------------
        static public void ShowNew(string key, object arg, eUIImpower impower = eUIImpower.Default)
        {
            UIHistoryData data = GetPenuItimateView();

            if (data != null)
            {
                if (key == data.key)
                {
                    UIHistoryStack.Remove(data);
                }
            }
            UIHistoryData uIHistoryData = new UIHistoryData();

            uIHistoryData.UpdateData(key, arg, impower);
            UIHistoryStack.Add(uIHistoryData);
            m_listHisoryUIName.Add(key);

            if (key == "UIErrorCtrl")
            {
                return;
            }
            if (key == "UIEffectCtrl")
            {
                return;
            }
            if (key == "UIItemGetCtrl")
            {
                return;
            }
            if (key == "UIDialogToggleCtrl")
            {
                return;
            }
            if (key == "UDisConnectionCtrl")
            {
                return;
            }
            if (key == "UICircleCtrl")
            {
                return;
            }
            if (key == "UIChatSimpleViewOldCtrl")
            {
                return;
            }
            if (key == "UIPlayerUpgradeCtrl")
            {
                return;
            }
            if (key == "UIGuideVeteranModeCtrl")
            {
                return;
            }
            if (key == "UIChatSimpleCtrl")
            {
                return;
            }

            if (allShowUI.IndexOf(key) == -1)
            {
                allShowUI.Add(key);
            }
            else
            {
                allShowUI.Remove(key);
                allShowUI.Add(key);
            }
        }