public static bool IsTrialFromLicence() { #if TRIAL_SIMULATION && !RELEASE return(trialSimulationValue); #endif var license = new Microsoft.Phone.Marketplace.LicenseInformation(); return(license.IsTrial()); }
private void DetermineIsTrail() { #if TRIAL IsTrial = true; #else var license = new Microsoft.Phone.Marketplace.LicenseInformation(); IsTrial = license.IsTrial(); #endif }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { #if TRIAL_LICENSE IsTrial = true; #else var licenseInfo = new Microsoft.Phone.Marketplace.LicenseInformation(); IsTrial = licenseInfo.IsTrial(); #endif }
static TrialHelper() { #if TRIAL // return true if debugging with trial enabled (DebugTrial configuration is active) IsTrial = true; #else var license = new Microsoft.Phone.Marketplace.LicenseInformation(); IsTrial = license.IsTrial(); #endif }
/// <summary> /// This should only be called when the app is Launching /// </summary> public void Launching() { var license = new Microsoft.Phone.Marketplace.LicenseInformation(); // Only load state if not trial if(!license.IsTrial()) this.LoadState(); // Uncomment for testing // this._state = FeedbackState.FirstReview; // this._state = FeedbackState.SecondReview; }
/// <summary> /// This should only be called when the app is Launching /// </summary> public void Launching() { var license = new Microsoft.Phone.Marketplace.LicenseInformation(); // Only load state if not trial if (!license.IsTrial()) { this.LoadState(); } // Uncomment for testing // this._state = FeedbackState.FirstReview; // this._state = FeedbackState.SecondReview; }
private void DetermineIsTrail() { #if TRIAL IsTrial = true; #else var license = new Microsoft.Phone.Marketplace.LicenseInformation(); IsTrial = license.IsTrial(); #endif try { EmulatorSettings.Current.IsTrial = IsTrial; } catch (Exception) { } }
private void button1_Click(object sender, RoutedEventArgs e) { int posizione = SaveLoadObj.LoadFromIsoStore(strDataFileEnablePos); if (!license.IsTrial()) { posizione++; if (posizione == 106) { posizione = 1; } SaveLoadObj.SaveToIsoStore(strDataFileEnablePos, posizione); int punti = 1; if (nAiuto == soluzione.Text.Length) { punti = 0; } nPunteggio = SaveLoadObj.LoadFromIsoStore("punteggio") - nAiuto + punti; SaveLoadObj.SaveToIsoStore("punteggio", nPunteggio); punteggio.Text = "Punteggio: " + nPunteggio; txtindovina.Text = ""; nAiuto = 0; gioca(); } else { if (posizione < 10) { posizione++; SaveLoadObj.SaveToIsoStore(strDataFileEnablePos, posizione); txtindovina.Text = ""; nAiuto = 0; gioca(); } else { detailTask.Show(); } } }
public void CheckPurchases() { #if WINDOWS_PHONE try { // if (InstalledProductKind == ProductKind.unknown) return; #if !DEBUG if (InstalledProductKind == ProductKind.Trial) { var licenseInfo = new Microsoft.Phone.Marketplace.LicenseInformation(); if (!licenseInfo.IsTrial()) { SessionLog.RecordMilestone("Converted from Trial to Paid", SessionId.ToString()); InstalledProductKind = ProductKind.Paid; Save(); } } #endif if (InstalledProductKind == ProductKind.Free && AdShows) { var productLicenses = CurrentApp.LicenseInformation.ProductLicenses; foreach (var license in productLicenses.Values) { if (license.IsActive && license.ProductId == RemoveAdsProduct) { SessionLog.RecordMilestone("RemoveAdsProduct Purchased", AppStats.Current.SessionId.ToString()); InstalledProductKind = ProductKind.Paid; AdShows = false; Save(); } if (license.IsActive && license.ProductId.StartsWith(PremiumProduct)) { SessionLog.RecordMilestone(license.ProductId + " Purchased", AppStats.Current.SessionId.ToString()); InstalledProductKind = ProductKind.Paid; AdShows = false; MultiMealHidden = false; Save(); } } } } catch (Exception ex) { LittleWatson.ReportException(ex); } #endif }
public static void ReloadTrialInfo() { if (IsFull) { if (Config.TrialStart == DateTime.MaxValue) { Config.TrialStart = DateTime.Now; } var license = new Microsoft.Phone.Marketplace.LicenseInformation(); IsTrial = license.IsTrial(); } else { IsTrial = false; } }
/// <summary> /// Called when FeedbackLayout control is instantiated, which is /// supposed to happen when application's main page is instantiated. /// </summary> public void Launching() { var license = new Microsoft.Phone.Marketplace.LicenseInformation(); // Only load state if app is not trial, app is not activated after // being tombstoned, and state has not been loaded before. if (!license.IsTrial() && PhoneApplicationService.Current.StartupMode == StartupMode.Launch && State == FeedbackState.Active) { LoadState(); } // Uncomment for testing // State = FeedbackState.FirstReview; // State = FeedbackState.SecondReview; }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { FiltersModel = new FiltersModel(); try { PhotoModel = TombstoningHelper.RestorePhotoModel(); ThumbnailModel = TombstoningHelper.RestorePhotoModel(); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("Unable to restore photo model: " + ex.Message); } ViewModelData.IsTrial = LisenceInfo.IsTrial(); } }
/// <summary> /// Checks whether or not this app is in trial mode. /// </summary> /// <returns></returns> public static bool IsTrial() { var isTrial = false; try { // 1. Force trial experience ? if (Settings.ForceTrialExperience) return true; var license = new Microsoft.Phone.Marketplace.LicenseInformation(); isTrial = license.IsTrial(); } catch (Exception) { // If license access fails for any reason... // don't like it crash the app. } return isTrial; }
private void GetInstalledProductKind() { #if DEBUG InstalledProductKind = ProductKind.Free; //.Trial; #endif if (InstalledProductKind != ProductKind.unknown) { return; } #if SUPPORTTRIAL if (LicensedProducts != null && LicensedProducts.Length > 0) // legacy, free with ads { InstalledProductKind = ProductKind.Free; return; } try { var licenseInfo = new Microsoft.Phone.Marketplace.LicenseInformation(); if (licenseInfo.IsTrial()) { InstalledProductKind = ProductKind.Trial; } else { // if paid, we need to figure out if it was free (ads supported), or paid for (remove all ads) var listing = await Windows.ApplicationModel.Store.CurrentApp.LoadListingInformationAsync(); foreach (var letter in listing.FormattedPrice) { if (letter != '0' && char.IsDigit(letter)) { InstalledProductKind = ProductKind.Paid; SessionLog.CurrentScreen.RecordMilestone("Paid w/o trial", listing.FormattedPrice); } } if (InstalledProductKind == ProductKind.unknown) { InstalledProductKind = ProductKind.Free; } } try { Save(); } catch (Exception ex) { LittleWatson.ReportException(ex); } CheckPurchases(); } catch (Exception ex) { LittleWatson.ReportException(ex); SessionLog.CurrentScreen.RecordMilestone("GetInstalled Product Exception: giveaway", ex.Message); InstalledProductKind = ProductKind.Paid; } #else InstalledProductKind = ProductKind.Free; #endif }
private static bool getIsTrilaFromLicenseInformation() { #if FAKESTORE return !_fakeActivated; #elif TRIAL return true; #else var license = new Microsoft.Phone.Marketplace.LicenseInformation(); return license.IsTrial(); #endif }
private void UpdateCachedTrialResult() { #if Iron7Free CachedTrialResult = TrialResult.Trial; #else if (CachedTrialResult == TrialResult.Unknown) { Microsoft.Phone.Marketplace.LicenseInformation license = new Microsoft.Phone.Marketplace.LicenseInformation(); if (license.IsTrial()) CachedTrialResult = TrialResult.Trial; else CachedTrialResult = TrialResult.Full; } #endif }
/// <summary> /// Called when FeedbackLayout control is instantiated, which is /// supposed to happen when application's main page is instantiated. /// </summary> public void Launching() { var license = new Microsoft.Phone.Marketplace.LicenseInformation(); // Only load state if app is not trial, app is not activated after // being tombstoned, and state has not been loaded before. if (!license.IsTrial() && PhoneApplicationService.Current.StartupMode == StartupMode.Launch && State == FeedbackState.Active) { LoadData(); } // Uncomment for testing // State = FeedbackState.FirstReview; // State = FeedbackState.SecondReview; }
public static void ReloadTrialInfo() { if (IsFull) { if (Config.TrialStart == DateTime.MaxValue) Config.TrialStart = DateTime.Now; var license = new Microsoft.Phone.Marketplace.LicenseInformation(); IsTrial = license.IsTrial(); } else { IsTrial = false; } }
/// <summary> /// Called when FeedbackLayout control is instantiated, which is /// supposed to happen when application's main page is instantiated. /// </summary> public void Launching() { #if SILVERLIGHT var license = new Microsoft.Phone.Marketplace.LicenseInformation(); #else var license = Windows.ApplicationModel.Store.CurrentApp.LicenseInformation; #endif // Only load state if app is not trial, app is not activated after // being tombstoned, and state has not been loaded before. #if SILVERLIGHT if (!license.IsTrial() && PhoneApplicationService.Current.StartupMode == StartupMode.Launch && #else if (!license.IsTrial && #warning The app state is no longer checked, this needs a review #endif State == FeedbackState.Active) { LoadState(); } // Uncomment for testing // State = FeedbackState.FirstReview; // State = FeedbackState.SecondReview; }