Example #1
0
        private void Awake()
        {
            Instance = this;
            grid     = GetGrid("Grid");
            cell     = GetName("Cell");

            SetCallback("Close", () =>
            {
                WindowMng.windowMng.PopView();
            });

            SetCallback("DeleteMail", () =>
            {
                StartCoroutine(StatisticsManager.Instance.DeleteMail(mailInfoList[currentSelectedIndex].id));
            });

            SetCallback("OneKey", () =>
            {
                if (mailInfoList.Count == 0)
                {
                    Util.ShowMsg("当前没有任何邮件可删除");
                    return;
                }

                GetName("ConfirmDialog").SetActive(true);
            });

            SetCallback("Cancel", () =>
            {
                GetName("ConfirmDialog").SetActive(false);
            });

            SetCallback("Ok", () =>
            {
                StartCoroutine(StatisticsManager.Instance.OnekeyDeleteMail());
                GetName("ConfirmDialog").SetActive(false);
            });

            mailInfoList.AddRange(MainDetailUI.Instance.MailInfoList);
            UpdateFrame();
        }
Example #2
0
 void OnDestroy()
 {
     Instance = null;
 }