public static void HasClaimedAllReward(string domain, Action <bool> callBack)
        {
            Action <bool, string> loadConfigCallBack = delegate(bool success, string s) {
                if (success)
                {
                    data = LoadUserData();
                    List <CrossPromotionItemConfig> items = crossPromotionConfig.GetList();
                    bool flag = true;
                    for (int i = 0; i < items.Count; i++)
                    {
                        if (!data.GetItem(items[i].id).isClaimed)
                        {
                            flag = false;
                            break;
                        }
                    }
                    callBack.Invoke(flag);
                }
                else
                {
                    callBack.Invoke(true);
                    errorAction.Invoke(Error.LoadConfig, s);
                }
            };

            Coroutiner.StartCoroutine(LoadConfig(domain, loadConfigCallBack));
        }
        public static void Show(string domain)
        {
            Action <bool> action = delegate(bool hasInternet) {
                if (hasInternet)
                {
                    Action <bool, string> loadConfigCallBack = delegate(bool success, string s) {
                        if (success)
                        {
                            data = LoadUserData();
                            CheckCrosspromotionStatus(data, false);
                            OpenWebview(domain);
                        }
                        else
                        {
                            errorAction.Invoke(Error.LoadConfig, s);
                        }
                    };
                    Coroutiner.StartCoroutine(LoadConfig(domain, loadConfigCallBack));
                }
                else
                {
                    errorAction.Invoke(Error.NoInternet, "");
                }
            };

            Coroutiner.StartCoroutine(Utils.CheckInternetConnection(action, domain));
        }
 static void OnReceivedMessage(UniWebView webView, UniWebViewMessage message)
 {
     if (message.path == "close")
     {
         Close(webView);
     }
     if (message.path == "reward")
     {
         int    id    = 0;
         int    value = 0;
         string type  = message.args["type"];
         if (int.TryParse(message.args["value"], out value) & int.TryParse(message.args["id"], out id))
         {
             CrossPromotionItemConfig item = crossPromotionConfig.GetCrossPromotionItemConfig(id);
             data.GetItem(id).Claim();
             Save(data);
             rewardAction.Invoke(type, value);
             interact.Invoke(Interact.ClaimReward, item);
         }
     }
     if (message.path == "OpenApp")
     {
         Close(webView);
         try {
             string id = message.args["id"];
             Coroutiner.StartCoroutine(DelayOpenApp(crossPromotionConfig.GetCrossPromotionItemConfig(int.Parse(id))));
         }
         catch (Exception e) {
             errorAction.Invoke(Error.LoadConfig, e.ToString());
         }
     }
 }