private void OnSortButton()
    {
        Action <int> callback = delegate(int result)
        {
            if (result > 0)
            {
                this.sortNameLabel.text = CMD_ChipSortModal.GetSortName();
                this.userChipList       = this.ConvertChipList(ChipDataMng.userChipData);
                this.chipList.ReAllBuild(this.userChipList, false, false);
                this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
                this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
                this.messageLabel.gameObject.SetActive(this.userChipList.Length == 0);
                if (this.viewModeType == CMD_ChipAdministration.ViewModeType.Sale)
                {
                    foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList in this.saleUserChipList)
                    {
                        this.chipList.SetSelectColor(userChipList.userChipId, true);
                    }
                    foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList2 in this.userChipList)
                    {
                        if (userChipList2.userMonsterId > 0)
                        {
                            this.chipList.SetSelectColor(userChipList2.userChipId, true);
                        }
                    }
                    for (int j = 0; j < this.saleUserChipList.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>(); j++)
                    {
                        this.chipList.SetSelectMessage(this.saleUserChipList[j].userChipId, (j + 1).ToString());
                    }
                }
            }
        };

        CMD_ChipSortModal.Create(callback);
    }
Esempio n. 2
0
    private void OnSortButton()
    {
        Action <int> callback = delegate(int result)
        {
            global::Debug.Log("result " + result);
            if (result > 0)
            {
                this.sortNameLabel.text = CMD_ChipSortModal.GetSortName();
                GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] array = this.ConvertChipList(ChipDataMng.userChipData);
                this.chipList.ReAllBuild(array, false, false);
                this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
                this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
                this.messageLabel.gameObject.SetActive(array.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>() == 0);
            }
        };

        CMD_ChipSortModal.Create(callback);
    }