예제 #1
0
        private void OnMailTitleClick(GameObject evt_go)//点击邮件列表
        {
            GameObject go;

            if (read_id != -1)
            {
                go = null;
                title_gos.TryGetValue((uint)read_id, out go);
                if (go != null)
                {
                    go.transform.FindChild("select").gameObject.SetActive(false);
                }
            }

            read_id = int.Parse(evt_go.name);
            go      = null;
            title_gos.TryGetValue((uint)read_id, out go);
            if (go != null)
            {
                go.transform.FindChild("select").gameObject.SetActive(true);
                getTransformByPath("right2/scroll_view/contain").localPosition = containPos;
            }

            if (A3_MailModel.getInstance().mail_details.ContainsKey((uint)read_id))
            {
                RefreshMailContent(read_id);
            }
            else
            {
                A3_MailProxy.getInstance().GetMailContent((uint)read_id);
            }
        }
예제 #2
0
 public override void onShowed()
 {
     if (a3_expbar.instance)
     {
         a3_expbar.instance.RemoveLightTip("mail");
     }
     A3_MailProxy.getInstance().addEventListener(A3_MailProxy.MAIL_NEW_MAIL, OnGetNewMail);
     A3_MailProxy.getInstance().addEventListener(A3_MailProxy.MAIL_NEW_MAIL_CONTENT, OnGetMailContent);
     A3_MailProxy.getInstance().addEventListener(A3_MailProxy.MAIL_GET_ATTACHMENT, OnGetAttachment);
     A3_MailProxy.getInstance().addEventListener(A3_MailProxy.MAIL_REMOVE_ONE, OnRemoveOne);
     A3_MailProxy.getInstance().addEventListener(A3_MailProxy.MAIL_GET_ALL, OnGetAll);
     A3_MailProxy.getInstance().addEventListener(A3_MailProxy.MAIL_DELETE_ALL, OnDeleteAll);
     RefreshMailList();
     if (sortedList != null && sortedList.Count > 0)
     {
         OnMailTitleClick(title_gos[sortedList[0].id]);
     }
     else
     {
         RefreshMailContent(read_id);
     }
     if (uiData != null && uiData.Count > 0)
     {
         OnMailTitleClick(title_gos[(uint)expshowid]);
     }
     else
     {
         RefreshMailContent(read_id);
     }
     GRMap.GAME_CAMERA.SetActive(false);
 }
예제 #3
0
 private void OnGetBtnClick()
 {
     if (muNetCleint.instance.CurServerTimeStampMS - lastClick > clickWaitMSec)
     {
         A3_MailProxy.getInstance().GetMailAttachment((uint)read_id);
         lastClick = muNetCleint.instance.CurServerTimeStampMS;
     }
 }
예제 #4
0
 public override void onClosed()
 {
     A3_MailProxy.getInstance().removeEventListener(A3_MailProxy.MAIL_NEW_MAIL, OnGetNewMail);
     A3_MailProxy.getInstance().removeEventListener(A3_MailProxy.MAIL_NEW_MAIL_CONTENT, OnGetMailContent);
     A3_MailProxy.getInstance().removeEventListener(A3_MailProxy.MAIL_GET_ATTACHMENT, OnGetAttachment);
     A3_MailProxy.getInstance().removeEventListener(A3_MailProxy.MAIL_REMOVE_ONE, OnRemoveOne);
     A3_MailProxy.getInstance().removeEventListener(A3_MailProxy.MAIL_GET_ALL, OnGetAll);
     A3_MailProxy.getInstance().removeEventListener(A3_MailProxy.MAIL_DELETE_ALL, OnDeleteAll);
     GRMap.GAME_CAMERA.SetActive(true);
 }
예제 #5
0
 private void ConfirmDelete()
 {
     A3_MailProxy.getInstance().RemoveMail((uint)read_id);
 }
예제 #6
0
 private void ConfirmDeleteAll()
 {
     A3_MailProxy.getInstance().DeleteAll();
 }
예제 #7
0
 private void OnAllGetClick()
 {
     A3_MailProxy.getInstance().GetAllAttachment();
 }