示例#1
0
 protected override void OnHide()
 {
     if (gameObject.activeInHierarchy)
     {
         StartCoroutine(YxTools.WaitExcuteCalls(OnHideAction));
     }
 }
示例#2
0
 protected override void OnShow(object o)
 {
     base.OnShow(o);
     CurtainManager.CloseCurtain();
     UserController.Instance.GetUserDateWithBackPack(OnBindBackDate);
     if (HallBg != null)
     {
         HallBg.Change(HallMainController.Instance.State);
     }
     ShowPreviewListView();
     StartCoroutine(YxTools.WaitExcuteCalls(OnShowActions));
 }
示例#3
0
 public virtual void OnTabSelect(YxTabItem tableView)
 {
     if (tableView == null)
     {
         return;
     }
     if (tableView.GetToggle().value.Equals(true))
     {
         TabSelectAction(tableView);
         StartCoroutine(YxTools.WaitExcuteCalls(OnTabSelectAction));
     }
 }
示例#4
0
 protected override void OnFreshView()
 {
     if (Data == null)
     {
         return;
     }
     if (int.TryParse(Data.ToString(), out TabSatate))
     {
         UpdateTabs(TabDatas);
     }
     else
     {
         ActionCallBack();
     }
     StartCoroutine(YxTools.WaitExcuteCalls(OnFreshAction));
 }
示例#5
0
        protected void DealPageData(PageRequestData data)
        {
            var showState = data.DataCount != 0;

            YxTools.TrySetComponentValue(NoDataSign, !showState);
            YxTools.TrySetComponentValue(Table.gameObject, showState);
            if (_isFirst)
            {
                _totalCount   = data.TotalCount;
                _perPageCount = data.PageCount;
                StartCoroutine(YxTools.WaitExcuteCalls(OnFirstAction));
                _isFirst = false;
            }
            _curCount += data.DataCount;
            var list = data.DataItems;

            RefreshView(list, Items.Count);
            Items.AddRange(list);
            if (CouldNotDrad() && data.ExistPageNum)
            {
                _curPage = data.PageNumber;
            }
            _request = false;
        }
示例#6
0
        public void OnClickExtractView()
        {
            string platform = "";
            float  value    = 0;
            string password = "";

            if (PlatformId)
            {
                platform = PlatformId.value;
            }
            if (CostNumber)
            {
                value = float.Parse(CostNumber.value);
            }
            if (Password)
            {
                password = Password.value;
            }
            if (string.IsNullOrEmpty(platform))
            {
                YxMessageBox.Show("账号不能为空");
                return;
            }
            if (string.IsNullOrEmpty(password))
            {
                YxMessageBox.Show("密码不能为空");
                return;
            }
            long realValue = YxUtiles.RecoverShowNumber(value);

            if (realValue < 1)
            {
                YxMessageBox.Show("输入金额过小,请重新输入!!!");
                return;
            }
            YxDebug.Log("Real value is:" + realValue);
            YxDebug.Log("show value is :" + value);
            var returnValue = YxUtiles.RecoverShowNumber(value);

            YxDebug.Log("Real exchange value is :" + returnValue);
            YxMessageBox.Show(
                string.Format(SureNoticeFormat, _curCostType, value, _extractValue),
                null,
                (window, btnname) =>
            {
                switch (btnname)
                {
                case YxMessageBox.BtnLeft:
                    Facade.Instance <TwManger>().SendAction(
                        ExtractAciton,
                        new Dictionary <string, object>()
                    {
                        { _keyExtractPlatformType, _curCostData.CostType },
                        { _keyExtractCostType, _curCostData.CostType },
                        { _keyExtractAccount, platform },
                        { _keyExtractValue, returnValue },
                        { _keyPassword, password },
                    },
                        delegate(object msg)
                    {
                        StartCoroutine(YxTools.WaitExcuteCalls(OnExtractSuccess));
                        Clear();
                    }
                        );
                    break;

                case YxMessageBox.BtnRight:
                    break;
                }
            },
                true,
                YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle
                );
        }
示例#7
0
 protected override void OnHide()
 {
     StartCoroutine(YxTools.WaitExcuteCalls(OnHideAction));
 }