예제 #1
0
 void OnReceiveMessage()
 {
     Message_Service.ListMyTips(t =>
     {
         TipsList = t.GetData() as List <ENewTips>;
         if (TipsList != null && TipsList.Count > 0)
         {
             PageTitle.BtnMenu.transform.Find("tips").gameObject.SetActive(true);
         }
         else
         {
             PageTitle.BtnMenu.transform.Find("tips").gameObject.SetActive(false);
         }
         ReBindTips();
         if (PageContent1.activeSelf)
         {
             BindProjectList();
         }
         else if (PageContent2.activeSelf)
         {
             BindPeopleList();
         }
         //else if(PageContent3.activeSelf)
         //    BindSystemMessageList();
     });
 }
예제 #2
0
    protected override void Init()
    {
        base.Init();
        PageTitle.Init("消息", App.Instance.Theme.TitleBgColor, App.Instance.Theme.TitleFontColor, null, MenuClicked);

        ProjectTips.gameObject.SetActive(false);
        PeopleTips.gameObject.SetActive(false);
        SystemTips.gameObject.SetActive(false);
        PageTitle.BtnMenu.transform.Find("tips").gameObject.SetActive(false);
        Message_Service.ListMyTips(t =>
        {
            TipsList = t.GetData() as List <ENewTips>;
            if (TipsList != null && TipsList.Count > 0)
            {
                PageTitle.BtnMenu.transform.Find("tips").gameObject.SetActive(true);
            }
            else
            {
                PageTitle.BtnMenu.transform.Find("tips").gameObject.SetActive(false);
            }

            ReBindTips();
            Tab.Init(OnTabClicked, App.Instance.Theme.SelectedItemBgColor);
        });
        PlatformCallBackListener.Instance.OnReceiveMessage = OnReceiveMessage;
    }
예제 #3
0
 void OnReceiveMessageRefreshTips()
 {
     PageTitle.BtnMenu.transform.Find("tips").gameObject.SetActive(false);
     Message_Service.ListMyTips(t =>
     {
         TipsList = t.GetData() as List <ENewTips>;
         if (TipsList != null && TipsList.Count > 0)
         {
             PageTitle.BtnMenu.transform.Find("tips").gameObject.SetActive(true);
         }
         else
         {
             PageTitle.BtnMenu.transform.Find("tips").gameObject.SetActive(false);
         }
     });
 }
예제 #4
0
    protected override void Init()
    {
        base.Init();
        UserName.text = Session.CurrentUser.Name;
        App.Instance.ShowImage(UserFace, Session.CurrentUser.Face, 11);
        for (int i = 0; i < ItemList.Count; i++)
        {
            GameObject menuItem = ItemList[i].gameObject;
            EventListener.Get(menuItem).onClick = MenuItem_OnClicked;
            if (SelectedItem == menuItem.name)
            {
                menuItem.GetComponentInChildren <RawImage>().color = App.Instance.Theme.SelectedItemBgColor;
                menuItem.GetComponentInChildren <Text>().color     = App.Instance.Theme.SelectedItemBgColor;
            }
            else
            {
                menuItem.GetComponentInChildren <RawImage>().color = Color.white;
                menuItem.GetComponentInChildren <Text>().color     = new Color(124 / 255f, 124 / 255f, 124 / 255f);
            }
        }


        TotalTips.gameObject.SetActive(false);
        Message_Service.ListMyTips(t =>
        {
            List <ENewTips> tipsList = t.GetData() as List <ENewTips>;
            if (tipsList.Count > 0)
            {
                TotalTips.gameObject.SetActive(true);
            }
            else
            {
                TotalTips.gameObject.SetActive(false);
            }
        });
    }