Beispiel #1
0
 private static void InterstitialAdOnShowingOverlay(object sender, AdEventArgs adEventArgs, string id)
 {
     if (ShowOverlay != null)
     {
         ShowOverlay(id);
     }
 }
Beispiel #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);
			});
		}
Beispiel #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);
     });
 }
Beispiel #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);
        }
Beispiel #7
0
 private static void InterstitialAdOnReceivedAd(object sender, AdEventArgs adEventArgs, string id)
 {
     if (ReceivedAd != null)
     {
         ReceivedAd(id);
     }
 }
Beispiel #8
0
 private static void InterstitialAdOnLeavingApplication(object sender, AdEventArgs adEventArgs, string id)
 {
     if (LeavingApplication != null)
     {
         LeavingApplication(id);
     }
 }
Beispiel #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);
     });
 }
Beispiel #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();
            }
        }
Beispiel #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();   
 
    
 
 }
Beispiel #15
0
 private void AdMobOnAdReceived(object sender, AdEventArgs e)
 {
     System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         AdDuplexAdControl.Visibility = Visibility.Collapsed;
         MSAdControl.Visibility       = Visibility.Collapsed;
     });
 }
Beispiel #16
0
 public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
 {
     if (OnAdDone != null)
     {
         AdEventArgs args = new AdEventArgs(placementId, showResult);
         OnAdDone(this, args);
     }
 }
Beispiel #17
0
        private void banner_onAdLoaded(object sender, AdEventArgs args)
        {
            fireAdEvent(EVENT_AD_LOADED, ADTYPE_BANNER);

            if ((!bannerVisible) && autoShowBanner)
            {
                __showBanner(adPosition, posX, posY);
            }
        }
Beispiel #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();
     }
 }
Beispiel #19
0
 private void interstitialAd_ReceivedAd(object sender, AdEventArgs e)
 {
     if (!App.ViewModel.Settings.IsTrial)
     {
         return;
     }
     interstitialAd.ShowAd();
     App.ViewModel.ShowInterstitialAd = false;
 }
Beispiel #20
0
        private void interstitial_onAdLoaded(object sender, AdEventArgs args)
        {
            fireAdEvent(EVENT_AD_LOADED, ADTYPE_INTERSTITIAL);

            if (autoShowInterstitial)
            {
                __showInterstitial();
            }
        }
 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);
         }
     });
 }
Beispiel #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);
         }
     });
 }
Beispiel #26
0
        private void OnAdReceived(object sender, AdEventArgs e)
        {
            Random P = new Random();
            int    I = P.Next(1, 10);

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

            }
        }
Beispiel #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);
        }
Beispiel #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);
        }
        //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);
        }
Beispiel #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();
     }
 }
        //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();
            }

        }
Beispiel #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 { }
         }
     }
 }
Beispiel #37
0
 private static void InterstitialAdOnLeavingApplication(object sender, AdEventArgs adEventArgs, string id)
 {
     if (LeavingApplication != null)
     {
         LeavingApplication(id);
     }
 }
 private void OnReceivedAd(object sender, AdEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine("Ad received successfully");
 }
Beispiel #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;
 }
Beispiel #42
0
 private void banner_onAdPresent(object sender, AdEventArgs args)
 {
     fireAdEvent (EVENT_AD_PRESENT, ADTYPE_BANNER);
 }
Beispiel #43
0
 private void interstitial_onAdDismiss(object sender, AdEventArgs args)
 {
     fireAdEvent (EVENT_AD_DISMISS, ADTYPE_INTERSTITIAL);
 }
Beispiel #44
0
 private void onLeavingApplicationAd(object sender, AdEventArgs args)
 {
     eventCallback("cordova.fireDocumentEvent('onLeaveToAd');");
 }
Beispiel #45
0
        private void interstitial_onAdLoaded(object sender, AdEventArgs args)
        {
            fireAdEvent (EVENT_AD_LOADED, ADTYPE_INTERSTITIAL);

            if (autoShowInterstitial) {
                __showInterstitial ();
            }
        }
Beispiel #46
0
 private void OnAdReceived(object sender, AdEventArgs e)
 {
     lock (_interstitial_lock)
     {
         _interstitial_loaded = true;
     }
 }
Beispiel #47
0
 private void onLeavingApplicationAd(object sender, AdEventArgs args)
 {
     fireAdEvent (EVENT_AD_LEAVEAPP, ADTYPE_BANNER);
 }
Beispiel #48
0
 private void OnDismissingOverlay(object sender, AdEventArgs e)
 {
     CheckIsPaid();
 }
Beispiel #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();
 }
Beispiel #52
0
        private void banner_onAdLoaded(object sender, AdEventArgs args)
        {
            fireAdEvent (EVENT_AD_LOADED, ADTYPE_BANNER);

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