Beispiel #1
0
    void UpdateInfo()
    {
        COM_ADEmployeeTotal data = MoreActivityData.instance.GetEmployeeTotal();

        if (data == null)
        {
            return;
        }
        string sfmt = "yyyy/MM/dd";
        string efmt = "yyyy/MM/dd";

        Define.FormatUnixTimestamp(ref sfmt, (int)data.sinceStamp_);
        Define.FormatUnixTimestamp(ref efmt, (int)data.endStamp_);

        timeLab.text = LanguageManager.instance.GetValue("zaomuchongzhitime").Replace("{n}", sfmt + " - " + efmt);

        for (int i = 0; i < CellList.Count; ++i)
        {
            grid.RemoveChild(CellList[i].transform);
            CellList[i].transform.parent = null;
            CellList[i].gameObject.SetActive(false);
        }
        CellList.Clear();

        for (int i = 0; i < data.contents_.Length; i++)
        {
            GameObject       objCell = Object.Instantiate(cell.gameObject) as GameObject;
            MoreSignInCellUI cellUI  = objCell.GetComponent <MoreSignInCellUI>();
            ItemCellUI       item    = UIManager.Instance.AddItemCellUI(cellUI.icon, data.contents_[i].itemIds_[0]);
            item.showTips  = true;
            item.ItemCount = (int)data.contents_[i].itemStacks_[0];
            UIManager.SetButtonEventHandler(cellUI.sgignInBtn.gameObject, EnumButtonEvent.OnClick, OnGetBtn, i, 0);
            cellUI.descLab.text = LanguageManager.instance.GetValue("morebuyEmpcell").Replace("{n}", ((data.contents_[i].outputCount_).ToString()));
            if (data.contents_[i].status_ == 1)
            {
                cellUI.sgignInBtn.gameObject.SetActive(true);
                cellUI.sgignInBtn.isEnabled = true;
                cellUI.haveImg.gameObject.SetActive(false);
            }
            else if (data.contents_[i].status_ == 2)
            {
                cellUI.sgignInBtn.gameObject.SetActive(false);
                cellUI.haveImg.gameObject.SetActive(true);
            }
            else
            {
                cellUI.sgignInBtn.gameObject.SetActive(true);
                cellUI.sgignInBtn.isEnabled = false;
                cellUI.haveImg.gameObject.SetActive(false);
            }
            objCell.transform.parent = grid.transform;
            objCell.SetActive(true);
            objCell.transform.localScale = Vector3.one;
            CellList.Add(objCell);
        }
        grid.Reposition();
    }
Beispiel #2
0
    void UpdateInfo()
    {
        COM_ADDiscountStore data = MoreActivityData.instance.GetSysDiscountStore();

        //COM_ADDiscountStore data = MoreActivityData.GetSysDiscountStore ();
        if (data == null)
        {
            return;
        }

        string sfmt = "yyyy/MM/dd";
        string efmt = "yyyy/MM/dd";

        Define.FormatUnixTimestamp(ref sfmt, (int)data.sinceStamp_);
        Define.FormatUnixTimestamp(ref efmt, (int)data.endStamp_);

        timeLab.text = LanguageManager.instance.GetValue("huodongshijian") + sfmt + " - " + efmt;

        for (int i = 0; i < CellList.Count; ++i)
        {
            grid.RemoveChild(CellList[i].transform);
            CellList[i].transform.parent = null;
            CellList[i].gameObject.SetActive(false);
        }
        CellList.Clear();
        for (int i = 0; i < data.contents_.Length; i++)
        {
            GameObject objCell             = Object.Instantiate(cell.gameObject) as GameObject;
            MoreDiscountStoreCellUI cellUI = objCell.GetComponent <MoreDiscountStoreCellUI>();
            ItemCellUI cellItem            = UIManager.Instance.AddItemCellUI(cellUI.item, data.contents_[i].itemId_);
            cellItem.showTips   = true;
            cellUI.nameLab.text = ItemData.GetData((int)data.contents_[i].itemId_).name_;
            int     price    = (int)data.contents_[i].price_;
            decimal discount = (decimal)(data.contents_[i].discount_ * 10f);
            decimal needM    = price * discount / 10;
            cellUI.needMoney.text = needM.ToString();
            cellUI.buyNumLab.text = LanguageManager.instance.GetValue("leijikemainum").Replace("{n}", data.contents_[i].buyLimit_.ToString());
            cellUI.oldMoney.text  = data.contents_[i].price_.ToString();
            cellUI.saleLab.text   = (data.contents_[i].discount_ * 10).ToString() + LanguageManager.instance.GetValue("salezhe");
            cellUI.data           = data.contents_[i];
            UIManager.SetButtonEventHandler(cellUI.gameObject, EnumButtonEvent.OnClick, OnGetBtn, (int)data.contents_[i].itemId_, (int)data.contents_[i].buyLimit_);
            objCell.transform.parent = grid.transform;
            objCell.SetActive(true);
            objCell.transform.localScale = Vector3.one;
            CellList.Add(objCell);
        }
        grid.Reposition();
    }
Beispiel #3
0
    void UpdateInfo()
    {
        COM_IntegralData data = MoreActivityData.instance.GetIntegralData();

        if (data == null)
        {
            return;
        }
        string sfmt = "yyyy/MM/dd";
        string efmt = "yyyy/MM/dd";

        Define.FormatUnixTimestamp(ref sfmt, (int)data.sinceStamp_);
        Define.FormatUnixTimestamp(ref efmt, (int)data.endStamp_);

        timeLab.text     = LanguageManager.instance.GetValue("leijichongzhitime").Replace("{n}", sfmt + " - " + efmt);
        getBtn.isEnabled = !data.isflag_;
        haveNumLab.text  = data.integral_.ToString();
        for (int i = 0; i < CellList.Count; ++i)
        {
            grid.RemoveChild(CellList[i].transform);
            CellList[i].transform.parent = null;
            CellList[i].gameObject.SetActive(false);
        }
        CellList.Clear();
        for (int i = 0; i < data.contents_.Length; i++)
        {
            GameObject objCell             = Object.Instantiate(cell.gameObject) as GameObject;
            MoreDiscountStoreCellUI cellUI = objCell.GetComponent <MoreDiscountStoreCellUI>();
            cellUI.integralData = data.contents_[i];
            ItemCellUI cellItem = UIManager.Instance.AddItemCellUI(cellUI.item, data.contents_[i].itemid_);
            cellItem.showTips     = true;
            cellUI.nameLab.text   = ItemData.GetData((int)data.contents_[i].itemid_).name_;
            cellUI.needMoney.text = (data.contents_[i].cost_).ToString();
            cellUI.buyNumLab.text = LanguageManager.instance.GetValue("leijikemainum").Replace("{n}", data.contents_[i].times_.ToString());
            //cellUI.data = data.contents_[i];
            UIManager.SetButtonEventHandler(cellUI.gameObject, EnumButtonEvent.OnClick, OnGetBtn, (int)data.contents_[i].itemid_, data.contents_[i].cost_);
            objCell.transform.parent = grid.transform;
            objCell.SetActive(true);
            objCell.transform.localScale = Vector3.one;
            CellList.Add(objCell);
        }
        grid.Reposition();
    }
Beispiel #4
0
    void Start()
    {
        isOpen = true;
        item_ten.SetActive(false);
        item.gameObject.SetActive(false);
        //UIManager.Instance.LoadMoneyUI(this.gameObject);
        UIManager.SetButtonEventHandler(oneBtn.gameObject, EnumButtonEvent.OnClick, OnClickOne, 0, 0);
        UIManager.SetButtonEventHandler(tenBtn.gameObject, EnumButtonEvent.OnClick, OnClickTen, 0, 0);
        UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClickclose, 0, 0);

        UIManager.SetButtonEventHandler(RTenBtn.gameObject, EnumButtonEvent.OnClick, OnClickRTenBtn, 0, 0);
        UIManager.SetButtonEventHandler(CloseBtn.gameObject, EnumButtonEvent.OnClick, OnClickCloseBtn, 0, 0);
        UIManager.SetButtonEventHandler(enterBtn.gameObject, EnumButtonEvent.OnClick, OnClickenterBtn, 0, 0);

        UIManager.SetButtonEventHandler(oneEnterB.gameObject, EnumButtonEvent.OnClick, OnClickoneEnter, 0, 0);
        UIManager.SetButtonEventHandler(rtenB.gameObject, EnumButtonEvent.OnClick, OnClickrten, 0, 0);

        for (int i = 0; i < itemsObj.Length; i++)
        {
            UISprite sp = itemsObj[i].GetComponent <UISprite>();
            names.Add(sp.spriteName);
        }
        item.text = "";
        InitLotteryData();
        ZhuanPanSystem.Gozhuanpan             += ShowLotteryTeams;
        ZhuanPanSystem.UpdateZhuanpanNoticeOk += UpdateZhuanpanNoticeOk;
        ZhuanPanSystem.ZhuanpanNotOk          += SycnZhuanpanNoticeOk;
        SycnZhuanpanNoticeOk(ZhuanPanSystem.ZhuanpanList);
        GlobalValue.Get(Constant.C_ZhuanPanOneGo, out one);
        GlobalValue.Get(Constant.C_ZhuanPanTenGo, out ten);
        oneLable.text = LanguageManager.instance.GetValue("Guild_Xiaohao") + one.ToString();
        tenLable.text = LanguageManager.instance.GetValue("Guild_Xiaohao") + ten.ToString();

        string sfmt = "yyyy/MM/dd";
        string efmt = "yyyy/MM/dd";

        Define.FormatUnixTimestamp(ref sfmt, (int)ZhuanPanSystem.zhuanData.sinceStamp_);
        Define.FormatUnixTimestamp(ref efmt, (int)ZhuanPanSystem.zhuanData.endStamp_);

        timeLab.text = LanguageManager.instance.GetValue("zhuanpantime").Replace("{n}", sfmt + " - " + efmt);
    }
Beispiel #5
0
    public void SetData(COM_SelledItem item)
    {
        string fmt = "MM月dd日HH:mm";

        Define.FormatUnixTimestamp(ref fmt, item.selledTime_);
        date_.text = fmt;
        string name = "";

        if (item.itemId_ != 0)
        {
            name       = ItemData.GetData(item.itemId_).name_;
            name_.text = name + string.Format("({0})", item.itemStack_);
        }
        else
        {
            name       = BabyData.GetData(item.babyId_)._Name;
            name_.text = name;
        }
        gainDiamond_.text = item.price_.ToString();
        tax_.text         = item.tax_.ToString();
    }
Beispiel #6
0
    void UpdateInfo()
    {
        COM_ADLoginTotal loginData = MoreActivityData.instance.GetLoginTotal();

        if (loginData == null)
        {
            return;
        }
        string sfmt = "yyyy/MM/dd";
        string efmt = "yyyy/MM/dd";

        Define.FormatUnixTimestamp(ref sfmt, (int)loginData.sinceStamp_);
        Define.FormatUnixTimestamp(ref efmt, (int)loginData.endStamp_);

        timeLab.text = timeLab.text = LanguageManager.instance.GetValue("huodongshijian") + sfmt + " - " + efmt;
        for (int i = 0; i < CellList.Count; ++i)
        {
            grid.RemoveChild(CellList[i].transform);
            CellList[i].transform.parent = null;
            CellList[i].gameObject.SetActive(false);
        }
        CellList.Clear();
        for (int i = 0; i < loginData.contents_.Length; i++)
        {
            GameObject       objCell  = Object.Instantiate(cell.gameObject) as GameObject;
            MoreSignInCellUI cellUI   = objCell.GetComponent <MoreSignInCellUI>();
            ItemCellUI       cellItem = UIManager.Instance.AddItemCellUI(cellUI.icon, loginData.contents_[i].itemIds_[0]);
            cellItem.showTips = true;

            ItemCellUI item1 = UIManager.Instance.AddItemCellUI(cellUI.icon1, loginData.contents_[i].itemIds_[1]);
            item1.showTips = true;

            ItemCellUI item2 = UIManager.Instance.AddItemCellUI(cellUI.icon2, loginData.contents_[i].itemIds_[2]);
            item2.showTips = true;


            cellUI.descLab.text = LanguageManager.instance.GetValue("leijidenglutian").Replace("{n}", (i + 1).ToString());
            UIManager.SetButtonEventHandler(cellUI.sgignInBtn.gameObject, EnumButtonEvent.OnClick, OnGetBtn, i, 0);
            if (loginData.contents_[i].status_ == 1)
            {
                cellUI.sgignInBtn.gameObject.SetActive(true);
                cellUI.sgignInBtn.isEnabled = true;
                cellUI.haveImg.gameObject.SetActive(false);
            }
            else if (loginData.contents_[i].status_ == 2)
            {
                cellUI.haveImg.gameObject.SetActive(true);
                cellUI.sgignInBtn.gameObject.SetActive(false);
            }
            else
            {
                cellUI.sgignInBtn.gameObject.SetActive(true);
                cellUI.sgignInBtn.isEnabled = false;
                cellUI.haveImg.gameObject.SetActive(false);
            }

            objCell.transform.parent = grid.transform;
            objCell.SetActive(true);
            objCell.transform.localScale = Vector3.one;
            CellList.Add(objCell);
        }
        grid.Reposition();
    }