// Token: 0x06000258 RID: 600 RVA: 0x0000AFE1 File Offset: 0x000091E1 public void Dispose() { if (!this.disposed) { ActivationManager.ProductKeyValidator_instance_delete(this.instanceId); } }
// Token: 0x060001A9 RID: 425 RVA: 0x00007A69 File Offset: 0x00005C69 public MainWindowViewModel(INavigation navigation, IUserInterface userInterface, WindowOperationsViewModel windowVM, ScratchManager scratchManager, FirstRunExperience firstRun, ActivationManager activationManager) : base(navigation, userInterface) { this.WindowOperationsViewModel = windowVM; this.scratchManager = scratchManager; this.firstRun = firstRun; this.activationManager = activationManager; }
// Token: 0x06000257 RID: 599 RVA: 0x0000AFC0 File Offset: 0x000091C0 public int GetValidationError() { int result; ActivationManager.ProductKeyValidator_ValidateKey(this.instanceId, string.Empty, out result); return(result); }
// Token: 0x06000259 RID: 601 RVA: 0x0000AFF8 File Offset: 0x000091F8 private bool GetActivationInfo(out string key, out string mpc, out string pid) { StringBuilder stringBuilder = new StringBuilder(string.Empty.PadLeft(32)); StringBuilder stringBuilder2 = new StringBuilder(string.Empty.PadLeft(24)); StringBuilder stringBuilder3 = new StringBuilder(string.Empty.PadLeft(16)); bool result = ActivationManager.ProductKeyValidator_GetActivationStatus(this.instanceId, stringBuilder, stringBuilder2, stringBuilder3); key = stringBuilder.ToString(); pid = stringBuilder2.ToString(); mpc = stringBuilder3.ToString(); return(result); }
// Token: 0x06000251 RID: 593 RVA: 0x0000AD24 File Offset: 0x00008F24 public ActivationManager(FirstRunExperience firstRunExperience, ProductInfo productInfo) { if (firstRunExperience == null) { throw new ArgumentNullException("firstRunExperience"); } this.firstRunExperience = firstRunExperience; if (productInfo == null) { throw new ArgumentNullException("productInfo"); } this.productInfo = productInfo; this.instanceId = ActivationManager.ProductKeyValidator_instance_new(); ActivationManager.ProductKeyValidator_Initialize(this.instanceId, productInfo.ActivationConfigFile, productInfo.ActivationRegistrationFile); }
// Token: 0x06000252 RID: 594 RVA: 0x0000AD84 File Offset: 0x00008F84 public bool Activate(string key) { try { if (!Directory.Exists(this.productInfo.ActivationRegistrationFolder)) { Directory.CreateDirectory(this.productInfo.ActivationRegistrationFolder); } if (Directory.Exists(this.productInfo.ActivationRegistrationFile)) { Directory.Delete(this.productInfo.ActivationRegistrationFile); LoggerExtensionMethods.LogWarning <ActivationManager>(this, "Registration file was directory", null, "Activate", "C:\\OxBuild\\30\\s\\hyperlapse_gui\\Hyperlapse\\Hyperlapse\\Model\\Activation\\ActivationManager.cs", 57); } } catch (Exception value) { LoggerExtensionMethods.LogError <ActivationManager>(this, "Couldn't create directory for registration file", new Dictionary <string, object> { { "Exception", value } }, "Activate", "C:\\OxBuild\\30\\s\\hyperlapse_gui\\Hyperlapse\\Hyperlapse\\Model\\Activation\\ActivationManager.cs", 62); return(false); } int num = 0; bool flag = ActivationManager.ProductKeyValidator_Activate(this.instanceId, key, out num); if (flag) { string value2; string value3; string value4; this.GetActivationInfo(out value2, out value3, out value4); LoggerExtensionMethods.LogEvent <ActivationManager>(this, "Activated Product", new Dictionary <string, object> { { "ProductKey", value2 }, { "Pid2", value4 }, { "MPC", value3 }, { "FirstRun", this.firstRunExperience.FirstRunTime.ToString() }, { "DaysToActivation", DateTime.Now.Subtract(this.firstRunExperience.FirstRunTime).TotalDays }, { "VideosProcessedToActivation", (double)this.firstRunExperience.VideosProcessed } }, "Activate", "C:\\OxBuild\\30\\s\\hyperlapse_gui\\Hyperlapse\\Hyperlapse\\Model\\Activation\\ActivationManager.cs", 77); } else { LoggerExtensionMethods.LogEvent <ActivationManager>(this, "Couldn't activate product", new Dictionary <string, object> { { "Step", num } }, "Activate", "C:\\OxBuild\\30\\s\\hyperlapse_gui\\Hyperlapse\\Hyperlapse\\Model\\Activation\\ActivationManager.cs", 81); } return(flag); }
// Token: 0x06000256 RID: 598 RVA: 0x0000AFA4 File Offset: 0x000091A4 public bool ValidateKey(string key) { int num; return(ActivationManager.ProductKeyValidator_ValidateKey(this.instanceId, key, out num)); }