Пример #1
0
        public IEnumerator ShowConfirm(Action <bool> completed)
        {
            bool            isCancel = false;
            CMD_ConfirmGDPR popup    = CMD_ConfirmGDPR.Create(this.network);

            if (null != popup)
            {
                yield return(AppCoroutine.Start(this.WaitClose(popup), false));

                isCancel = popup.IsCancel();
            }
            if (completed != null)
            {
                completed(isCancel);
            }
            yield break;
        }
Пример #2
0
        public static CMD_ConfirmGDPR Create(ConfirmGDPR_Network network)
        {
            CMD_ConfirmGDPR cmd_ConfirmGDPR = null;

            GameWebAPI.ResponseGdprInfo.Details[] details = network.Details;
            List <ConfirmGDPR_Rule> list = new List <ConfirmGDPR_Rule>();

            for (int i = 0; i < details.Length; i++)
            {
                ConfirmGDPR_Network.GDPRWebPageType webPageType = network.GetWebPageType(details[i]);
                if (network.IsConfirmWebPage(webPageType))
                {
                    list.Add(new ConfirmGDPR_Rule(webPageType, details[i].url));
                }
            }
            if (0 < list.Count)
            {
                cmd_ConfirmGDPR         = (GUIMain.ShowCommonDialog(null, "CMD_ConfirmGDPR", null) as CMD_ConfirmGDPR);
                cmd_ConfirmGDPR.network = network;
                cmd_ConfirmGDPR.rules   = list;
            }
            return(cmd_ConfirmGDPR);
        }