Exemple #1
0
 public static void SaveCookies(WPFBrowserView wpfBrowserView, string url, string registryName)
 {
     // we register cookies with a specific url into registries
     if (url != null && wpfBrowserView.Browser != null && wpfBrowserView.Browser.CookieStorage != null)
     {
         List <DotNetBrowser.Cookie> cookiesList     = wpfBrowserView.Browser.CookieStorage.GetAllCookies(url);
         List <CookieData>           cookiesDataList = new List <CookieData>();
         foreach (var cookie in cookiesList)
         {
             cookiesDataList.Add(new CookieData(cookie, url));
         }
         string cookiesAsString = Serializer.Save <List <CookieData> >(cookiesDataList);
         RegistryHelpers.SaveSetting(registryName + "_" + url, cookiesAsString);
     }
 }
 public static void StartTrial(string featureId)
 {
     RegistryHelpers.SaveSetting("Trial_" + TrialHelpers.TRIAL_VERSION_IDENTIFIER + "_" + featureId, DateTime.Now.ToOADate().ToString(CultureInfo.InvariantCulture));
 }
 public static void RememberThatTheTrialMessageWasDisplayedToday()
 {
     RegistryHelpers.SaveSetting("TrialMessageLastDisplayDate_" + TrialHelpers.TRIAL_VERSION_IDENTIFIER, DateTime.Today.ToOADate().ToString(CultureInfo.InvariantCulture));
 }
Exemple #4
0
 public void SetHobbyist()
 {
     RegistryHelpers.SaveSetting("IsCommunity", "yes");
     MainWindow.ProfilDetailEdition.Text = Constants.COMMUNITY_EDITION_FRIENDLY_NAME;
     Enable = false;
 }