Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (pushs.Count == 0)
        {
            return;
        }
        if (!ConfirmUtil.isConfirmShow() && !LoadUtil.isActivity() && !DialogUtil.isPopTips())
        {
            if (!isOpen)
            {
                tryToOpenPush();
            }
        }
        ByteBuffer buffer = MyUtilTools.tryToLogic("DealGrab");

        if (buffer != null)
        {
            DialogUtil.tip("抢单成功", true);
        }
        buffer = MyUtilTools.tryToLogic("DealFavorite");
        if (buffer != null)
        {
            int type = buffer.ReadInt();
            int len  = buffer.ReadInt();
            MainData.instance.user.favorites.Clear();
            for (int i = 0; i < len; i++)
            {
                long value = buffer.ReadLong();
                MainData.instance.user.favorites.Add(value);
            }
            DialogUtil.tip(type == 0 ? "收藏成功" : "取消收藏成功", true);
        }
    }
Exemplo n.º 2
0
        void Update()
        {
            bool       flag   = false;
            ByteBuffer buffer = MyUtilTools.tryToLogic("DealDel");

            if (buffer != null)
            {
                DialogUtil.tip("撤销成功", true);
            }
            buffer = MyUtilTools.tryToLogic("RevertDel");
            if (buffer != null)
            {
                DialogUtil.tip("操作成功", true);
            }
            buffer = MyUtilTools.tryToLogic("UserLook");
            if (buffer != null)
            {
                dealEvent.toLook(buffer);
            }
            buffer = MyUtilTools.tryToLogic("DealIssue");
            if (buffer != null)
            {
                DialogUtil.tip(buffer.ReadString(), true);
            }
            if (flag)
            {
                dealEvent.updateList();
            }
        }
Exemplo n.º 3
0
        void Update()
        {
            ByteBuffer buffer = MyUtilTools.tryToLogic("AddressChange");

            if (buffer != null)
            {
                byte type = buffer.ReadByte();
                MainData.instance.user.deserialize(buffer);
                DialogUtil.tip(type == 1 ? "删除成功" : "添加成功", true, new EventDelegate(infoEvent.refreshAddressList));
            }
            if (isPressed)
            {
                count++;
                if (count > 50)
                {
                    openPop();
                    count = 0;
                }
            }
            else
            {
                if (delete_obj.activeSelf)
                {
                    popCount--;
                    if (popCount <= 0)
                    {
                        delete_obj.SetActive(false);
                    }
                }
            }
        }
Exemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("Regist");

        if (buffer != null)
        {
            //注册成功
            DialogUtil.tip(buffer.ReadString());
            clearInputs();
        }
        buffer = MyUtilTools.tryToLogic("Token");
        if (buffer != null)
        {
            startTime = System.DateTime.Now.Ticks / 10000000;
            tokenButton.SetState(UIButtonColor.State.Disabled, true);
        }
        if (startTime > 0)
        {
            long now = System.DateTime.Now.Ticks / 10000000;
            int  fix = (int)(now - startTime);
            if (fix >= 60)
            {
                init();
            }
            else
            {
                tokenLabe.text = "重发(" + MyUtilTools.numToString(60 - fix) + ")秒";
            }
        }
    }
Exemplo n.º 5
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("OpenAccountApply");

        if (buffer != null)
        {
            isUploaded = false;
            DialogUtil.tip("申请成功", true, new EventDelegate(backToCenter));
        }

        /*
         * buffer = MyUtilTools.tryToLogic("Token");
         * if (buffer != null)
         * {
         *  startTime = DateTime.Now.Ticks / 10000000;
         *  tokenButton.SetState(UIButtonColor.State.Disabled,true);
         * }
         * if (startTime > 0)
         * {
         *  long now = DateTime.Now.Ticks / 10000000;
         *  int fix = (int)(now - startTime);
         *  if (fix >= 60)
         *  {
         *      initPhoneSend();
         *  }
         *  else
         *  {
         *      tokenLabe.text = "重发(" + MyUtilTools.numToString(60 - fix) + ")秒";
         *  }
         * }*/
    }
Exemplo n.º 6
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("AdminMemberSearch");

        if (buffer != null)
        {
            int size = buffer.ReadInt();
            if (size > 0)
            {
                selectIndex = 0;
                users.Clear();
                for (int i = 0; i < size; i++)
                {
                    MainData.UserData user = new MainData.UserData();
                    user.deserialize(buffer);
                    users.Add(user);
                }
                refresh();
            }
            else
            {
                DialogUtil.tip("查找不到相关数据");
            }
        }
        buffer = MyUtilTools.tryToLogic("AdminUserResetPwd");
        if (buffer != null)
        {
            DialogUtil.tip(buffer.ReadString(), true);
        }
        buffer = MyUtilTools.tryToLogic("AdminUserCommit");
        if (buffer != null)
        {
            DialogUtil.tip("提交成功", true);
        }
    }
Exemplo n.º 7
0
        void Update()
        {
            ByteBuffer buffer = MyUtilTools.tryToLogic("BankAccountDel");

            if (buffer != null)
            {
                DialogUtil.tip("删除成功", true, new EventDelegate(infoEvent.refreshAccountList));
            }
            if (isPressed)
            {
                count++;
                if (count > 50)
                {
                    openPop();
                    count = 0;
                }
            }
            else
            {
                if (delete_obj.activeSelf)
                {
                    popCount--;
                    if (popCount <= 0)
                    {
                        delete_obj.SetActive(false);
                    }
                }
            }
        }
Exemplo n.º 8
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("FindPassword");

        if (buffer != null)
        {
            tips_obj.SetActive(true);
            startTime  = System.DateTime.Now.Ticks / 10000000;
            labe.color = Color.red;
            button.SetState(UIButtonColor.State.Disabled, true);
        }
        if (startTime > 0)
        {
            long now = System.DateTime.Now.Ticks / 10000000;
            long fix = now - startTime;
            if (fix >= 60)
            {
                init();
            }
            else
            {
                labe.text = "剩余" + (60 - fix) + " 秒";
            }
        }
    }
Exemplo n.º 9
0
        void Update()
        {
            ByteBuffer buffer = MyUtilTools.tryToLogic("AddAccount");

            if (buffer != null)
            {
                MainData.instance.user.bacnkAccount.deserialize(buffer);
                DialogUtil.tip("添加成功", true, uEvent.callback);
            }
            buffer = MyUtilTools.tryToLogic("SellerCommit");
            if (buffer != null)
            {
                MainData.instance.user.seller.deserialize(buffer);
                DialogUtil.tip("申请成功", true, new EventDelegate(uEvent.backFromRZAndRefresh));
            }
            buffer = MyUtilTools.tryToLogic("UserUpdate");
            if (buffer != null)
            {
                MainData.instance.user.deserialize(buffer);
                uEvent.backToCenter();
            }
            buffer = MyUtilTools.tryToLogic("AddressChange");
            if (buffer != null)
            {
                byte type = buffer.ReadByte();
                MainData.instance.user.deserialize(buffer);
                DialogUtil.tip(type == 1 ? "删除成功" : "添加成功", true, uEvent.callback);
            }
        }
Exemplo n.º 10
0
        // Update is called once per frame
        void Update()
        {
            ByteBuffer buffer = MyUtilTools.tryToLogic("BuyDeploy");

            if (buffer != null)
            {
                buy.backToCenter();
            }
        }
Exemplo n.º 11
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("AdminResetPwd");

        if (buffer != null)
        {
            DialogUtil.tip("密码重置成功", true);
        }
    }
Exemplo n.º 12
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("Notice");

        if (buffer != null)
        {
            decode(buffer.ReadString());
        }
    }
Exemplo n.º 13
0
        // Update is called once per frame
        void Update()
        {
            ByteBuffer buffer = MyUtilTools.tryToLogic("Issue");

            if (buffer != null)
            {
                sell.backToCenter();
            }
        }
Exemplo n.º 14
0
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("EnterDeal");

        if (buffer != null)
        {
            MainData.instance.deserializeDeals(buffer);
            initList();
        }
    }
Exemplo n.º 15
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("EnterDeal");

        if (buffer != null)
        {
            MainData.instance.deserializeDeals(buffer);
            dealEvent.backSearch();
        }
    }
Exemplo n.º 16
0
        // Update is called once per frame
        void Update()
        {
            ByteBuffer buffer = MyUtilTools.tryToLogic("TimeLineEvent");

            if (buffer != null)
            {
                timeEvent.readInfo(buffer);
                timeEvent.refresh();
            }
        }
Exemplo n.º 17
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("TimeLineEvent");

        if (buffer != null)
        {
            readInfo(buffer);
            init();
        }
    }
Exemplo n.º 18
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("AgencyEnter");

        if (buffer != null)
        {
            back();
            agencyEvent.readDatas(buffer);
        }
    }
Exemplo n.º 19
0
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("DealEdit");

        if (buffer != null)
        {
            MainData.instance.deserializeDealModule(buffer);
            gameObject.SetActive(false);
            callback.Execute();
        }
    }
Exemplo n.º 20
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("AutoLogin");

        if (buffer != null)
        {//登录成功
            MainData.instance.user.deserialize(buffer);
            MainData.instance.deserializeSimpleOrderModule(buffer);
            login_obj.SetActive(false);
            main_obj.SetActive(true);
        }
    }
Exemplo n.º 21
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("AdminLogin");

        if (buffer != null)
        {
            transform.parent.gameObject.SetActive(false);
            transform.parent.parent.FindChild("admin-main").gameObject.SetActive(true);
            MainData.instance.user.deserialize(buffer);
            AdminAgencyManager.deserializeAll(buffer);
            AdminUserRZ.deserializeAll(buffer);
        }
    }
Exemplo n.º 22
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("AdminDealSearch");

        if (buffer != null)
        {
            MainData.instance.deserializeDeals(buffer);
            selectIndex = 0;
            refreshList();
        }
        buffer = MyUtilTools.tryToLogic("AdminDealMore");
        if (buffer != null)
        {
            MainData.instance.deserializeDeals(buffer);
            backHighSearch(transform.FindChild("right").gameObject, transform.FindChild("search-pop").gameObject);
            refreshList();
        }
        buffer = MyUtilTools.tryToLogic("AdminDealRevoke");
        if (buffer != null)
        {
            long dealId = buffer.ReadLong();
            for (int i = 0; i < MainData.instance.deal_all.Count; i++)
            {
                DealBody deal = MainData.instance.deal_all[i];
                if (deal.id == dealId)
                {
                    MainData.instance.deal_all.RemoveAt(i);
                    break;
                }
            }
            MainData.instance.deserializeDeals(buffer);
            backHighSearch(transform.FindChild("right").gameObject, transform.FindChild("search-pop").gameObject);
            if (selectIndex > 0)
            {
                selectIndex--;
            }
            refreshList();
        }
        buffer = MyUtilTools.tryToLogic("AdminOrderRevoke");
        if (buffer != null)
        {
            DialogUtil.tip("撤销成功", true);
        }
        buffer = MyUtilTools.tryToLogic("AdminLockDeal");
        if (buffer != null)
        {
            DialogUtil.tip("操作成功", true);
        }
    }
Exemplo n.º 23
0
    // Update is called once per frame
    void Update()
    {
        int count_mjfk = 0, count_mjqr = 0;

        foreach (DealBody.Order order in orders)
        {
            if (order.state == 1)
            {
                count_mjfk++;
            }
            else if (order.state == 4)
            {
                count_mjqr++;
            }
        }
        bool flag = count_mjfk != mjfk.FindChild("suns").childCount || count_mjqr != mjqr.FindChild("suns").childCount;

        if (flag)
        {
            refresh();
        }
        ByteBuffer buffer = MyUtilTools.tryToLogic("AdminLookUser");

        if (buffer != null)
        {
            MainData.UserData user = new MainData.UserData();
            user.deserialize(buffer);
            refreshUser(user);
        }
        buffer = MyUtilTools.tryToLogic("AdminOrderRevoke");
        if (buffer != null)
        {
            DialogUtil.tip("撤销成功", true);
        }
        buffer = MyUtilTools.tryToLogic("AdminDealOrderUpdate");
        if (buffer != null)
        {
            DialogUtil.tip("操作成功", true);
        }
        Transform right = transform.FindChild("right");

        if (orders.Count == 0)
        {
            right.FindChild("order-help").gameObject.SetActive(false);
            right.FindChild("appraise").gameObject.SetActive(false);
            right.FindChild("user-look").gameObject.SetActive(false);
            return;
        }
    }
Exemplo n.º 24
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("RevertAdd");

        if (buffer != null)
        {
            //MainData.instance.deserializeDealModule(buffer);
            gameObject.SetActive(false);
            if (okback != null)
            {
                okback.Execute();
                okback = null;
            }
        }
    }
Exemplo n.º 25
0
        void Update()
        {
            ByteBuffer buffer = MyUtilTools.tryToLogic("OrderRevoke");

            if (buffer != null)
            {
                DialogUtil.tip("申请成功", true);
            }
            if (order.item.flag == JustRun.DEL_FLAG)
            {//浏览的交易被删除了
                _dealEvent.backList();
                return;
            }
            if (order.refresh)
            {
                order.insterToObj(gameObject);
                UIButton button = transform.FindChild("look").GetComponent <UIButton>();
                if (order.item.uid == MainData.instance.user.id || MainData.instance.user.id == order.buyId)
                {
                    EventDelegate event_delegat = new EventDelegate(_dealEvent, "openLook");
                    event_delegat.parameters[0]     = new EventDelegate.Parameter();
                    event_delegat.parameters[0].obj = new LongParamter(order.item.id);
                    event_delegat.parameters[1]     = new EventDelegate.Parameter();
                    if (order.item.uid == MainData.instance.user.id)
                    {
                        event_delegat.parameters[1].obj = new LongParamter(order.buyId);
                    }
                    else if (order.buyId == MainData.instance.user.id)
                    {
                        event_delegat.parameters[1].obj = new LongParamter(order.item.uid);
                    }
                    button.onClick.Add(event_delegat);
                }
                else
                {
                    EventDelegate event_delegat = new EventDelegate(nolook);
                    button.onClick.Add(event_delegat);
                }
                GameObject buy_obj  = transform.FindChild("buyer-appraise").gameObject;
                GameObject sell_obj = transform.FindChild("seller-appraise").gameObject;
                order.buyerAppraise.insterToObj(buy_obj, gameObject, transform.parent.parent.parent.gameObject);
                order.sellerAppraise.insterToObj(sell_obj, gameObject, transform.parent.parent.parent.gameObject);
                order.refresh = false;
            }
        }
Exemplo n.º 26
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("RankEvent");

        if (buffer != null)
        {
            entitys.Clear();
            int len = buffer.ReadInt();
            for (int i = 0; i < len; i++)
            {
                RankEntity entity = new RankEntity();
                entity.deserialize(buffer);
                entitys.Add(entity);
            }
            click();
            refresh();
        }
    }
Exemplo n.º 27
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("AdminSellerOpration");

        if (buffer != null)
        {
            if (selectIndex > 0)
            {
                selectIndex--;
            }
            DialogUtil.tip("操作成功", true);
            return;
        }
        if (datas.Count != leftContainer.childCount)
        {
            refresh();
        }
    }
Exemplo n.º 28
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("LookDealOrder");

        if (buffer != null)
        {
            MainData.instance.deserializeDeals(buffer);
            long           orderId = buffer.ReadLong();
            DealBody       deal    = MainData.instance.deal_all[0];
            DealBody.Order order   = deal.searchOrder(orderId);
            gotoDeal(order);
            return;
        }
        if (MainData.instance.user.simpleOrderModuleNeedRefresh)
        {
            refresh();
            MainData.instance.user.simpleOrderModuleNeedRefresh = false;
        }
    }
Exemplo n.º 29
0
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("DealSearch");

        if (buffer != null)
        {
            int type = buffer.ReadInt();
            Debug.Log("DealSearch type =" + type);
            MainData.instance.deserializeDeals(buffer);
            if (MainData.instance.deal_all.Count == 0)
            {
                DialogUtil.tip("未找到相关数据");
            }
            else
            {
                dealEvent.initList();
                dealEvent.listBack = new EventDelegate(backFromDealEvent);
                show(false);
            }
        }
    }
Exemplo n.º 30
0
    // Update is called once per frame
    void Update()
    {
        ByteBuffer buffer = MyUtilTools.tryToLogic("Login");

        if (buffer != null)
        {//登录成功
            MainData.instance.user.deserialize(buffer);
            MainData.instance.deserializeSimpleOrderModule(buffer);
            dataSaver.save(account.value, pwd.value);
            enterIn();
            if (callback != null)
            {
                callback.Execute();
            }
        }
        buffer = MyUtilTools.tryToLogic("Tourist");
        if (buffer != null)
        {//游客访问
            MainData.instance.deserializeSimpleOrderModule(buffer);
            enterIn();
        }
    }