Esempio n. 1
0
 private static void InterstitialAdOnShowingOverlay(object sender, AdEventArgs adEventArgs, string id)
 {
     if (ShowOverlay != null)
     {
         ShowOverlay(id);
     }
 }
Esempio n. 2
0
        private void picAd_Paint(object sender, PaintEventArgs e)
        {
            Rectangle rect = new Rectangle(0, 0, picAd.Width, 5 * Tenor.Mobile.UI.Skin.Current.ScaleFactor.Height);

            Tenor.Mobile.Drawing.GradientFill.Fill(
                e.Graphics, rect,
                Color.DarkGray, Color.Black, GradientFill.FillDirection.TopToBottom);

            rect = new Rectangle(
                0, rect.Height, picAd.Width, picAd.Height - rect.Height);
            e.Graphics.FillRectangle(
                new SolidBrush(Color.Black),
                rect);

            if (picAd.Tag != null)
            {
                AdEventArgs ad = picAd.Tag as AdEventArgs;
                if (ad != null && lnkTextLink.Text != ad.Text)
                {
                    if (ad.Text != null)
                    {
                        lnkTextLink.Text    = ad.Text.Replace("&", "&&");
                        lnkTextLink.Visible = true;
                    }
                    else
                    {
                        lnkTextLink.Visible = false;
                    }
                }
            }
        }
 private void OnAdReceived(object sender, AdEventArgs e)
 {
     if (adControl != null)
     {
         adControl.Height = 50;
     }
 }
		void ad_ShowingOverlay(object sender, AdEventArgs e)
		{
			ReignServices.InvokeOnUnityThread(delegate
			{
				if (eventCallback != null) eventCallback(InterstitialAdEvents.Shown, null);
			});
		}
Esempio n. 5
0
 // Event Handler called before playing an ad
 private void Embedded_OnAdStart(object sender, AdEventArgs e)
 {
     var nowait = Windows.ApplicationModel.Core.CoreApplication.MainView.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
     {
         AnimateHeight(200);
     });
 }
Esempio n. 6
0
        // Event Handler called before playing an ad
        private void SdkInstance_OnAdStart(object sender, AdEventArgs e)
        {
            // e.Id        - Vungle app ID in string
            // e.Placement - placement ID in string

            System.Diagnostics.Debug.WriteLine("OnAdStart(" + e.Id + "): " + e.Placement);
        }
Esempio n. 7
0
 private static void InterstitialAdOnReceivedAd(object sender, AdEventArgs adEventArgs, string id)
 {
     if (ReceivedAd != null)
     {
         ReceivedAd(id);
     }
 }
Esempio n. 8
0
 private static void InterstitialAdOnLeavingApplication(object sender, AdEventArgs adEventArgs, string id)
 {
     if (LeavingApplication != null)
     {
         LeavingApplication(id);
     }
 }
Esempio n. 9
0
 // Event Handler called before playing an ad
 private void Embedded_OnAdStart(object sender, AdEventArgs e)
 {
     var nowait = this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
     {
         AnimateHeight(200);
     });
 }
Esempio n. 10
0
        protected void interstitialView_ReceivedAd(object sender, AdEventArgs e)
        {
            Debug.WriteLine("interstitialView_ReceivedAd");

            PluginResult pr;

            if (fullScreenAdPreload)
            {
                pr = new PluginResult(PluginResult.Status.OK, "onInterstitialAdPreloaded");
                pr.KeepCallback = true;
                plugin.DispatchCommandResult(pr);
                //PluginResult pr = new PluginResult(PluginResult.Status.ERROR);
                //pr.KeepCallback = true;
                //plugin.DispatchCommandResult(pr);
            }

            pr = new PluginResult(PluginResult.Status.OK, "onInterstitialAdLoaded");
            pr.KeepCallback = true;
            plugin.DispatchCommandResult(pr);
            //PluginResult pr = new PluginResult(PluginResult.Status.ERROR);
            //pr.KeepCallback = true;
            //plugin.DispatchCommandResult(pr);

            if (!fullScreenAdPreload)
            {
                interstitialView.ShowAd();
            }
        }
Esempio n. 11
0
 private static void InterstitialAdOnDismissingOverlay(object sender, AdEventArgs adEventArgs, string id)
 {
     if (DismissingAd != null)
     {
         DismissingAd(id);
     }
 }
		void ad_LeavingApplication(object sender, AdEventArgs e)
		{
			ReignServices.InvokeOnUnityThread(delegate
			{
				if (eventCallback != null) eventCallback(InterstitialAdEvents.Clicked, null);
			});
		}
		private void adReceived(object sender, AdEventArgs e)
		{
			ReignServices.InvokeOnUnityThread(delegate
			{
				if (eventCallback != null) eventCallback(InterstitialAdEvents.Cached, null);
			});
		}
 private void OnAdReceived(object sender, AdEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine("Ad received successfully");
     interstitialAd.ShowAd();   
 
    
 
 }
Esempio n. 15
0
 private void AdMobOnAdReceived(object sender, AdEventArgs e)
 {
     System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         AdDuplexAdControl.Visibility = Visibility.Collapsed;
         MSAdControl.Visibility       = Visibility.Collapsed;
     });
 }
Esempio n. 16
0
 public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
 {
     if (OnAdDone != null)
     {
         AdEventArgs args = new AdEventArgs(placementId, showResult);
         OnAdDone(this, args);
     }
 }
Esempio n. 17
0
        private void banner_onAdLoaded(object sender, AdEventArgs args)
        {
            fireAdEvent(EVENT_AD_LOADED, ADTYPE_BANNER);

            if ((!bannerVisible) && autoShowBanner)
            {
                __showBanner(adPosition, posX, posY);
            }
        }
Esempio n. 18
0
 private void OnAdDone(object sender, AdEventArgs e)
 {
     if (e.AdShowResult == ShowResult.Finished && e.PlacementID == AdManager.REWARD_AD)
     {
         GamePanel.SetActive(true);
         gameover.SetActive(false);
         player.FullHP();
     }
 }
Esempio n. 19
0
 private void interstitialAd_ReceivedAd(object sender, AdEventArgs e)
 {
     if (!App.ViewModel.Settings.IsTrial)
     {
         return;
     }
     interstitialAd.ShowAd();
     App.ViewModel.ShowInterstitialAd = false;
 }
Esempio n. 20
0
        private void interstitial_onAdLoaded(object sender, AdEventArgs args)
        {
            fireAdEvent(EVENT_AD_LOADED, ADTYPE_INTERSTITIAL);

            if (autoShowInterstitial)
            {
                __showInterstitial();
            }
        }
Esempio n. 21
0
 void adView_ReceivedAd(object sender, AdEventArgs e)
 {
     ReignServices.InvokeOnUnityThread(delegate
     {
         if (eventCallback != null)
         {
             eventCallback(AdEvents.Refreshed, null);
         }
     });
 }
 void ad_LeavingApplication(object sender, AdEventArgs e)
 {
     ReignServices.InvokeOnUnityThread(delegate
     {
         if (eventCallback != null)
         {
             eventCallback(InterstitialAdEvents.Clicked, null);
         }
     });
 }
Esempio n. 23
0
        private void OnAdReceived(object sender, AdEventArgs e)
        {
            Random p = new Random();
            int    j = p.Next(1, 100);

            if (j >= 88)
            {
                interstitialAd.ShowAd();
            }
        }
 void ad_ShowingOverlay(object sender, AdEventArgs e)
 {
     ReignServices.InvokeOnUnityThread(delegate
     {
         if (eventCallback != null)
         {
             eventCallback(InterstitialAdEvents.Shown, null);
         }
     });
 }
 private void adReceived(object sender, AdEventArgs e)
 {
     ReignServices.InvokeOnUnityThread(delegate
     {
         if (eventCallback != null)
         {
             eventCallback(InterstitialAdEvents.Cached, null);
         }
     });
 }
Esempio n. 26
0
        private void OnAdReceived(object sender, AdEventArgs e)
        {
            Random P = new Random();
            int    I = P.Next(1, 10);

            if (I > 5)
            {
                interstitialAd.ShowAd();
            }
        }
Esempio n. 27
0
 private void OnAdReceived(object sender, AdEventArgs e)
 {
     try
     {
         interstitialAd.ShowAd();
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 28
0
        private void OnAdReceived(object sender, AdEventArgs e)
        {
            try
            {
                interstitialAd.ShowAd();
            }
            catch (Exception ex)
            {

            }
        }
Esempio n. 29
0
    void OnNewRewardedAdEvent(AdEventArgs args)
    {
        // Unsubscribe
        AdsManager.NewRewardedAdEvent -= OnNewRewardedAdEvent;

        if (args.adEvent == AdEvent.ShouldReward)
        {
            // Reward the user with coins
            RewardCoins();
        }
    }
        protected void interstitial_ShowingOverlay(object sender, AdEventArgs e)
        {
            Debug.WriteLine("OnInterstitialPresentScreen");

            PluginResult pr = new PluginResult(PluginResult.Status.OK, "onInterstitialAdShown");

            pr.KeepCallback = true;
            plugin.DispatchCommandResult(pr);
            //PluginResult pr = new PluginResult(PluginResult.Status.ERROR);
            //pr.KeepCallback = true;
            //plugin.DispatchCommandResult(pr);
        }
Esempio n. 31
0
        protected void interstitialView_DismissingOverlay(object sender, AdEventArgs e)
        {
            Debug.WriteLine("interstitialView_DismissingOverlay");

            PluginResult pr = new PluginResult(PluginResult.Status.OK, "onInterstitialAdHidden");

            pr.KeepCallback = true;
            plugin.DispatchCommandResult(pr);
            //PluginResult pr = new PluginResult(PluginResult.Status.ERROR);
            //pr.KeepCallback = true;
            //plugin.DispatchCommandResult(pr);
        }
Esempio n. 32
0
        //interstitialView.DismissingOverlay
        private void OnInterstitialViewDismissingOverlay(object sender, AdEventArgs e)
        {
            Debug.WriteLine("OnInterstitialViewDismissScreen");

            PluginResult pr = new PluginResult(PluginResult.Status.OK, "onFullScreenAdHidden");

            //pr.KeepCallback = true;
            DispatchCommandResult(pr);
            //PluginResult pr = new PluginResult(PluginResult.Status.ERROR);
            //pr.KeepCallback = true;
            //DispatchCommandResult(pr);
        }
Esempio n. 33
0
 void adMob_AdArrived(object sender, AdEventArgs e)
 {
     try
     {
         timer.Change(60000 * 4, 60000 * 4);
         View.Invoke(new ThreadStart(delegate()
         {
             View.picAd.Tag = e;
             View.picAd.Invalidate();
         }));
     }
     catch (ObjectDisposedException) { }
 }
 private void OnAdReceived(object sender, AdEventArgs e)
 {
     //Fire off the messenger
     if (Messenger != null)
     {
         Messenger("AdMob Ad Received");
     }
     //Fire off the OnRefreshedEvent
     if (OnRefreshedDelegate != null)
     {
         OnRefreshedDelegate();
     }
 }
Esempio n. 35
0
        //reklam hazırsa olacaklar
        private void İnterstitialAd_ReceivedAd(object sender, AdEventArgs e)
        {
            if (IsolatedStorageSettings.ApplicationSettings["reklam1"] == "0")
            {
                interstitialAd.ShowAd();
                IsolatedStorageSettings.ApplicationSettings["reklam"] = "0";
            }
            else
            {
                IsolatedStorageSettings.ApplicationSettings["reklam"] = "2";
                IsolatedStorageSettings.ApplicationSettings.Save();
            }

        }
Esempio n. 36
0
 private void lnkTextLink_Click(object sender, EventArgs e)
 {
     if (picAd.Tag != null)
     {
         AdEventArgs ad = picAd.Tag as AdEventArgs;
         if (ad != null)
         {
             try
             {
                 System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(ad.Link, string.Empty));
             }
             catch { }
         }
     }
 }
Esempio n. 37
0
 private static void InterstitialAdOnLeavingApplication(object sender, AdEventArgs adEventArgs, string id)
 {
     if (LeavingApplication != null)
     {
         LeavingApplication(id);
     }
 }
Esempio n. 38
0
 private void OnReceivedAd(object sender, AdEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine("Ad received successfully");
 }
Esempio n. 39
0
 private void ReceivedAd(object sender, AdEventArgs e)
 {
     _banner_ready = true;
 }
 private void OnDismissingOverlay(object sender, AdEventArgs e)
 {
     Debug.WriteLine("Dismissing interstitial.");
     showInterstitial.IsEnabled = false;
     requestInterstitial.IsEnabled = true;
 }
 private void OnAdReceived(object sender, AdEventArgs e)
 {
     Debug.WriteLine("Received interstitial successfully. Click 'Show Interstitial'.");
     requestInterstitial.IsEnabled = false;
     showInterstitial.IsEnabled = true;
 }
Esempio n. 42
0
 private void banner_onAdPresent(object sender, AdEventArgs args)
 {
     fireAdEvent (EVENT_AD_PRESENT, ADTYPE_BANNER);
 }
Esempio n. 43
0
 private void interstitial_onAdDismiss(object sender, AdEventArgs args)
 {
     fireAdEvent (EVENT_AD_DISMISS, ADTYPE_INTERSTITIAL);
 }
Esempio n. 44
0
 private void onLeavingApplicationAd(object sender, AdEventArgs args)
 {
     eventCallback("cordova.fireDocumentEvent('onLeaveToAd');");
 }
Esempio n. 45
0
        private void interstitial_onAdLoaded(object sender, AdEventArgs args)
        {
            fireAdEvent (EVENT_AD_LOADED, ADTYPE_INTERSTITIAL);

            if (autoShowInterstitial) {
                __showInterstitial ();
            }
        }
Esempio n. 46
0
 private void OnAdReceived(object sender, AdEventArgs e)
 {
     lock (_interstitial_lock)
     {
         _interstitial_loaded = true;
     }
 }
Esempio n. 47
0
 private void onLeavingApplicationAd(object sender, AdEventArgs args)
 {
     fireAdEvent (EVENT_AD_LEAVEAPP, ADTYPE_BANNER);
 }
Esempio n. 48
0
 private void OnDismissingOverlay(object sender, AdEventArgs e)
 {
     CheckIsPaid();
 }
Esempio n. 49
0
        // Interstitial events
        private void onRecievedInterstitialAd(object sender, AdEventArgs args)
        {
            interstitialAd.ShowAd();

            eventCallback("cordova.fireDocumentEvent('onReceiveInterstitialAd');");
        }
 private void OnAdReceived(object sender, AdEventArgs e)
 {
     Debug.WriteLine("Received ad successfully");
 }
 private void OnAdReceived(object sender, AdEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine("Ad received successfully");
     interstitialAd.ShowAd();
 }
Esempio n. 52
0
        private void banner_onAdLoaded(object sender, AdEventArgs args)
        {
            fireAdEvent (EVENT_AD_LOADED, ADTYPE_BANNER);

            if( (! bannerVisible) && autoShowBanner) ) {
                __showBanner(adPosition, posX, posY);
            }
        }
Esempio n. 53
0
 private void interstitial_onAdPresent(object sender, AdEventArgs args)
 {
     fireAdEvent (EVENT_AD_PRESENT, ADTYPE_INTERSTITIAL);
 }
Esempio n. 54
0
 private static void InterstitialAdOnReceivedAd(object sender, AdEventArgs adEventArgs, string id)
 {
     if (ReceivedAd != null)
     {
         ReceivedAd(id);
     }
 }
Esempio n. 55
0
 private void onDismissingOverlayAd(object sender, AdEventArgs args)
 {
     eventCallback("cordova.fireDocumentEvent('onDismissAd');");
 }
Esempio n. 56
0
 private static void InterstitialAdOnShowingOverlay(object sender, AdEventArgs adEventArgs, string id)
 {
     if (ShowOverlay != null)
     {
         ShowOverlay(id);
     }
 }
Esempio n. 57
0
 private void onReceivedAd(object sender, AdEventArgs args)
 {
     eventCallback("cordova.fireDocumentEvent('onReceiveAd');");
 }
Esempio n. 58
0
 private void banner_onAdDismiss(object sender, AdEventArgs args)
 {
     fireAdEvent (EVENT_AD_DISMISS, ADTYPE_BANNER);
 }
Esempio n. 59
0
 private void onShowingOverlayInterstitialAd(object sender, AdEventArgs args)
 {
     eventCallback("cordova.fireDocumentEvent('onPresentInterstitialAd');");
 }
Esempio n. 60
0
 private static void InterstitialAdOnDismissingOverlay(object sender, AdEventArgs adEventArgs, string id)
 {
     if (DismissingAd != null)
     {
         DismissingAd(id);
     }
 }