internal void Refresh() { _licenseEntry = LicenseEntry.Load(); UserInfo = GetUserInfo(_licenseEntry.Name, _licenseEntry.Company); UserEmail = _licenseEntry.Email; IsMachineLicenseEnabled = _licenseEntry.RuntimeLicense != null; RefreshLicenseState(); RefreshLicenseItems(); }
public static void Show(Window ownerWindow, string assemblyPath, string assemblyData) { LicenseEntry licenseEntry = LicenseConsoleData.Singleton.LicenseEntry; NameValueCollection parameters = PrepareParameters(LicenseType.Distributable, licenseEntry.LicenseKey, licenseEntry.Name, licenseEntry.Company, assemblyData); parameters.Add("AssemblyPath", assemblyPath); parameters.Add("LicenseCategory", LicenseConsoleData.GetLicenseCategory(LicenseType.Distributable)); Show(ownerWindow, parameters); }
private static void LoadDisabledRuntimeLicense(LicenseEntry licenseEntry) { if (File.Exists(DisabledRuntimeLicenseFile)) { var licenseString = File.ReadAllText(DisabledRuntimeLicenseFile); licenseEntry._disabledRuntimeLicenseString = licenseString; licenseEntry._disabledRuntimeLicense = GetLicense(licenseString); } }
public static LicenseEntry Load() { LicenseEntry result = new LicenseEntry(); if (File.Exists(LicenseInfoFile)) { var serializer = new XmlSerializer(typeof(LicenseInfo)); using (var reader = XmlTextReader.Create(new StringReader(File.ReadAllText(LicenseInfoFile)))) { var info = (LicenseInfo)serializer.Deserialize(reader); result._licenseKey = DecryptLicenseKey(info.LicenseKey); result._name = info.Name; result._company = info.Company; result._email = info.Email; } } LoadRuntimeLicense(result); LoadDisabledRuntimeLicense(result); return(result); }
public void ToggleRuntimeLicense() { LicenseEntry.ToggleRuntimeLicense(); Refresh(); }
internal void SaveProductLicense(LicenseKey licenseKey, string userName, string company, string email, string designTimeLicense, string runtimeLicense) { LicenseEntry.Save(licenseKey, userName, company, email, designTimeLicense, runtimeLicense); Refresh(); }