Exemplo n.º 1
0
        public void ShowRetry()
        {
            FrameMgr.OpenUIParams ui_params = new FrameMgr.OpenUIParams(UIDefine.UI_POPUP_WITH_CONFIRM);

            List <object> pops = new List <object>();

            PopUpTickerData pd = new PopUpTickerData();

            pd.title          = "NETWORK_RETRY_TITLE";
            pd.content        = "NETWORK_RETRY_CONTENT";
            pd.content_param0 = null;
            pd.OneButtonText  = "close_button";
            pd.isOneBtn       = true;
            pd.order_in_layer = 13000;
            pd.oneAction      = BackToLogin;
            pd.ticker_seconds = (int)HttpRetry.C_MAX_RETRY_SECONDS;

            PopUpConfirmData pd_confirm = new PopUpConfirmData();

            pd_confirm.title          = "";
            pd_confirm.content        = "NETWORK_RETRY_CONFIRM";
            pd_confirm.content_param0 = null;
            pd_confirm.isOneBtn       = false;
            pd_confirm.twoStr         = "close_button";
            pd_confirm.oneAction      = ContinueRetry;
            pd_confirm.twoAction      = BackToLogin;

            pops.Add(pd);
            pops.Add(pd_confirm);

            ui_params.Param = pops;

            EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(ui_params);
        }
Exemplo n.º 2
0
        public override void OnShow(object param)
        {
            base.OnShow(param);
            InitListener();

            m_confirm_root.Visible = false;

            if (param != null)
            {
                List <object> datas = param as List <object>;


                m_data = (PopUpTickerData)(datas[0]);
                InitPanel(m_data);
                m_confirm_data = (PopUpConfirmData)(datas[1]);

                if (!m_confirm_data.isOneBtn)
                {
                    m_confirm_data.oneActionFromPop = () => { this.m_pop_root.Visible = true; this.ResetTicker(); };
                }

                m_confirm_root.InitConfirmPanel(m_confirm_data);
            }

            Dictionary <UBSParamKeyName, object> _param = new Dictionary <UBSParamKeyName, object>();

            _param.Add(UBSParamKeyName.Description, "sync error");
            UserBehaviorStatisticsModules.Instance.LogEvent(UBSEventKeyName.net_error, null, _param);
        }
Exemplo n.º 3
0
            public void InitConfirmPanel(PopUpConfirmData data)
            {
                if (data == null)
                {
                    return;
                }

                m_data = data;


                m_one_root.Visible = data.isOneBtn;
                m_two_root.Visible = !data.isOneBtn;
                if (data.IsMultipleLanguage)
                {
                    if (string.IsNullOrEmpty(data.content_param0))
                    {
                        m_content_lab.Text = LocalizeModule.Instance.GetString(data.content);
                    }
                    else
                    {
                        m_content_lab.Text = LocalizeModule.Instance.GetString(data.content, data.content_param0);
                    }
                }
                else
                {
                    this.m_content_lab.Text = data.content;
                }

                if (string.IsNullOrEmpty(data.title))
                {
                    m_title_lab.Text = "";
                }
                else
                {
                    m_title_lab.Text = LocalizeModule.Instance.GetString(data.title);
                }

                if (data.isOneBtn)
                {
                    if (data.IsMultipleLanguage && !string.IsNullOrEmpty(data.OneButtonText))
                    {
                        m_one_lab.Text = LocalizeModule.Instance.GetString(data.OneButtonText);
                    }
                }
                else
                {
                    m_twoFirst_lab.Text  = LocalizeModule.Instance.GetString(data.OneButtonText);
                    m_twoSecond_lab.Text = LocalizeModule.Instance.GetString(data.twoStr);
                }
            }