Esempio n. 1
0
 private void VAC_VservAdNoFill(object sender, System.EventArgs e)
 {
     adCalled = false;
     InneractiveAd.DisplayAd("Openitvn_MummyMazeDeluxe_Nokia", InneractiveAd.IaAdType.IaAdType_Interstitial, LayoutRoot, 60, new Dictionary <InneractiveAd.IaOptionalParams, string>());
     adCalled       = true;
     allowPressBack = true;
 }
 public static void DisplayInterstitial(Grid layoutRoot)
 {
     // Display interstitial ad using the static DisplayAd method
     // In order to maximize your revenues, we recommend allowing the application usage only if the returned value is true:
     // PAY ATTENTION:   DisplayAd() checks for connectivity, first of all,
     //                  but GetIsNetworkAvailable() always returns true at the emulator
     if (!InneractiveAd.DisplayAd(appId, InneractiveAd.IaAdType.IaAdType_Interstitial, layoutRoot, 0))
     {
         System.Diagnostics.Debug.WriteLine("This application is free but requires an internet connection. Please configure your connectivity settings and re-try.");
         //NavigationService.GoBack();
     }
 }
Esempio n. 3
0
 protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
 {
     if (Main.IsPremium || adCalled || !NetworkInterface.GetIsNetworkAvailable())
     {
         App.Quit();
     }
     else
     {
         InneractiveAd.DisplayAd("Openitvn_MummyMazeDeluxe_Nokia", InneractiveAd.IaAdType.IaAdType_Interstitial, LayoutRoot, 60, new Dictionary <InneractiveAd.IaOptionalParams, string>());
         adCalled = true;
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Interstitial_Click
 /// </summary>
 private void Interstitial_Click(object sender, RoutedEventArgs e)
 {
     // Display interstitial ad using the static DisplayAd method
     // In order to maximize your revenues, we recommend allowing the application usage only if the returned value is true:
     // PAY ATTENTION:   DisplayAd() checks for connectivity, first of all,
     //                  but GetIsNetworkAvailable() always returns true at the emulator
     if (!InneractiveAd.DisplayAd("MyCompany_MyApp", InneractiveAd.IaAdType.IaAdType_Interstitial, LayoutRoot, 0))
     {
         MessageBox.Show("This application is free but requires an internet connection. Please configure your connectivity settings and re-try.");
         //NavigationService.GoBack();
     }
 }
        public static void DisplayTextAd(Grid grid, IaAdEventHandlers eventHandlers)
        {
            // Display text ad in the TextAdGrid
            // In order to maximize your revenues, we recommend allowing the application usage only if the returned value is true:
            // PAY ATTENTION:   DisplayAd() checks for connectivity, first of all,
            //                  but GetIsNetworkAvailable() always returns true at the emulator
            //if (!InneractiveAd.DisplayAd("MyCompany_MyApp", InneractiveAd.IaAdType.IaAdType_Text, GetGrid(), 60, optionalParams))
            //{
            //   MessageBox.Show("This application is free but requires an internet connection. Please configure your connectivity settings and re-try.");
            //    //NavigationService.GoBack();
            //}

            // When using the DisplayAd method you may choose to send event handlers, so you may catch the ad's events
            if (!InneractiveAd.DisplayAd(appId, InneractiveAd.IaAdType.IaAdType_Text, grid, 60, OptionalParams, eventHandlers))
            {
                System.Diagnostics.Debug.WriteLine("This application is free but requires an internet connection. Please configure your connectivity settings and re-try.");
                //NavigationService.GoBack();
            }
        }