public AppViewModel() { adInterstitial = this.AdInterstitial; ShowInterstitial = new CoreCommand((obj) => { adInterstitial.ShowAd(); }); RemoveAds = new CoreCommand(async(obj) => { await MakePurchase(); }); }
public Numbers_eveningHistorique() { InitializeComponent(); GlobalVariable.count++; if (GlobalVariable.count == 4) { GlobalVariable.count = 0; adInterstitial = DependencyService.Get <IAdInterstitial>(); adInterstitial.ShowAd(); } callAPI(); }
public QuebecMaxPrizePage() { InitializeComponent(); GlobalVariable.count++; if (GlobalVariable.count == 4) { GlobalVariable.count = 0; Device.BeginInvokeOnMainThread(() => { IAdInterstitial adInterstitial = DependencyService.Get <IAdInterstitial>(); adInterstitial.ShowAd(); }); } }
public MegamillionsHistoriquePage() { InitializeComponent(); GlobalVariable.count++; if (GlobalVariable.count == 4) { GlobalVariable.count = 0; adInterstitial = DependencyService.Get <IAdInterstitial>(); adInterstitial.ShowAd(); } callAPI(); }
public MainPage() { InitializeComponent(); var label = new Label(); label.Text = "C# Ad Banner"; stackLayout.Children.Add(label); var adBanner = new AdBanner(); adBanner.Size = AdBanner.Sizes.MediumRectangle; stackLayout.Children.Add(adBanner); adInterstitial = DependencyService.Get <IAdInterstitial>(); }
public MainPage() { InitializeComponent(); NavigationPage.SetBackButtonTitle(this, ""); GlobalVariable.count++; adInterstitial = DependencyService.Get <IAdInterstitial>(); adInterstitial.ShowAd(); Device.BeginInvokeOnMainThread(() => { callAPI(); }); }
public QuebecLaMiniHistoricalPage() { InitializeComponent(); GlobalVariable.count++; Device.BeginInvokeOnMainThread(() => { if (GlobalVariable.count == 4) { GlobalVariable.count = 0; IAdInterstitial adInterstitial = DependencyService.Get <IAdInterstitial>(); adInterstitial.ShowAd(); } callAPI(); }); }
public OntarioPick2EveningPage() { InitializeComponent(); GlobalVariable.count++; Device.BeginInvokeOnMainThread(() => { if (GlobalVariable.count == 4) { GlobalVariable.count = 0; IAdInterstitial adInterstitial = DependencyService.Get <IAdInterstitial>(); adInterstitial.ShowAd(); } callAPI(); }); }
private async Task callAPI() { UserDialogs.Instance.ShowLoading("Please wait...", MaskType.Black); try { HttpClient client = new HttpClient(); var uri = new Uri("http://mobixapp.com/loto_canada_api/Api/getLastNational"); var response = await client.GetAsync(uri); if (response.IsSuccessStatusCode) { var content = await response.Content.ReadAsStringAsync(); dynamic responseJson = JsonConvert.DeserializeObject(content); dynamic output = responseJson[0]; //lotto_max dynamic lotto_max = output["lotto_max"]; lotto_max_n1.Text = lotto_max[0]["n1"].Value; lotto_max_n2.Text = lotto_max[0]["n2"].Value; lotto_max_n3.Text = lotto_max[0]["n3"].Value; lotto_max_n4.Text = lotto_max[0]["n4"].Value; lotto_max_n5.Text = lotto_max[0]["n5"].Value; lotto_max_n6.Text = lotto_max[0]["n6"].Value; lotto_max_n7.Text = lotto_max[0]["n7"].Value; lotto_max_n8.Text = lotto_max[0]["n8"].Value; lotto_max_tirage_du.Text = lotto_max[0]["tirage_du"].Value; //lotto_649 dynamic lotto_649 = output["lotto_649"]; lotto_649_n1.Text = lotto_649[0]["n1"].Value; lotto_649_n2.Text = lotto_649[0]["n2"].Value; lotto_649_n3.Text = lotto_649[0]["n3"].Value; lotto_649_n4.Text = lotto_649[0]["n4"].Value; lotto_649_n5.Text = lotto_649[0]["n5"].Value; lotto_649_n6.Text = lotto_649[0]["n6"].Value; lotto_649_n7.Text = lotto_649[0]["n7"].Value; lotto_649_tirage_du.Text = lotto_649[0]["tirage_du"].Value; //daily_grand dynamic daily_grand = output["daily_grand"]; daily_grand_n1.Text = daily_grand[0]["n1"].Value; daily_grand_n2.Text = daily_grand[0]["n2"].Value; daily_grand_n3.Text = daily_grand[0]["n3"].Value; daily_grand_n4.Text = daily_grand[0]["n4"].Value; daily_grand_n5.Text = daily_grand[0]["n5"].Value; daily_grand_n6.Text = daily_grand[0]["n6"].Value; daily_grand_tirage_du.Text = daily_grand[0]["tirage_du"].Value; UserDialogs.Instance.HideLoading(); IAdInterstitial adInterstitial = DependencyService.Get <IAdInterstitial>(); adInterstitial.ShowAd(); } } catch (Exception ex) { UserDialogs.Instance.HideLoading(); await DisplayAlert("Error", "An error has occurred, please try again.", "OK"); //Debug.WriteLine(@"ERROR {0}", ex.Message); } }