Exemple #1
0
 public void ItemSelectedEventHandle(EmaiListItem selectedEquipItem)
 {
     SoundManager.Instance.PlaySoundEffect("Sound_Button_MailChoice");
     //所有项LoseFocus
     //SelectedItemID
     ItemList.ApplyAllItem(p => p.OnLoseFocus());
     selectedEquipItem.OnGetFocus();
     SelectedItemID = selectedEquipItem._EamilItem.llMailID;
     EmailDataManager.Instance.ReadEmail(selectedEquipItem._EamilItem.llMailID, selectedEquipItem._EamilItem.byEmailPage);
     EmailInfoPanelManager.GetInstance().ChangeEmailPageStatus(EmailPageStatus.ShowEmail, EmaiSubPageStatus.EmailRead);
     //EmailInfoPanelManager.GetInstance().ChangeEmailPageStatus(EmailPageStatus.ShowEmail,EmaiSubPageStatus.EmailWrite);
 }
Exemple #2
0
        void InitItem()
        {
            for (int i = 0; i < PageSize; i++)
            {
                Item_go      = NGUITools.AddChild(ItemTable.gameObject, FriendListItemPrefab);
                Item_go.name = FriendListItemPrefab.name + i;
                Item_go.AddComponent <UIDragPanelContents>();
                Item_go.SetActive(false);
                EmaiListItem Sc_item = Item_go.GetComponent <EmaiListItem>();
                //Sc_item.InitItemData(EmailList[i]);
                Sc_item.OnClickCallBack = ItemSelectedEventHandle;

                ItemList.Add(Sc_item);
            }
        }
Exemple #3
0
        private void SetItemData(GameObject go)
        {
            int index = int.Parse(go.name);

            if (index >= EmailList.Count)
            {
                return;
            }
            EmaiListItem Item = go.GetComponent <EmaiListItem>();

            Item.InitItemData(EmailList[index]);
            if (EmailList [index].llMailID == SelectedItemID)
            {
                Item.OnGetFocus();
            }
            else
            {
                Item.OnLoseFocus();
            }
        }