Beispiel #1
0
        void NendAdInterstitial_OnShowAd(string message)
        {
            string[] array = message.Split(':');
            if (2 != array.Length)
            {
                return;
            }
            NendAdInterstitialShowResult result = (NendAdInterstitialShowResult)int.Parse(array [0]);
            string spotId = array [1];
            EventHandler <NendAdInterstitialShowEventArgs> handler = AdShown;

            if (null != handler)
            {
                NendAdInterstitialShowEventArgs args = new NendAdInterstitialShowEventArgs();
                args.ShowResult = result;
                args.SpotId     = spotId;
                handler(this, args);
            }
            if (null != _callback)
            {
                if (_callback is NendAdInterstitialCallbackWithSpot)
                {
                    ((NendAdInterstitialCallbackWithSpot)_callback).OnShowInterstitialAd(result, spotId);
                }
                else
                {
                    _callback.OnShowInterstitialAd(result);
                }
            }
        }
Beispiel #2
0
        void NendAdInterstitial_OnShowAd(string message)
        {
            string[] array = message.Split(':');
            if (2 != array.Length)
            {
                return;
            }
            NendAdInterstitialShowResult result = (NendAdInterstitialShowResult)int.Parse(array [0]);
            string spotId = array [1];
            EventHandler <NendAdInterstitialShowEventArgs> handler = AdShown;

            if (null != handler)
            {
                NendAdInterstitialShowEventArgs args = new NendAdInterstitialShowEventArgs();
                args.ShowResult = result;
                args.SpotId     = spotId;
                handler(this, args);
            }
        }