// Token: 0x06000046 RID: 70 RVA: 0x00002B68 File Offset: 0x00000D68
 private void CheckRegistry()
 {
     using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(SetupChecksRegistryConstant.RegistryPathForLanguagePack, true))
     {
         bool flag = true;
         if (registryKey != null)
         {
             string text = (string)registryKey.GetValue("LanguagePackBundlePath");
             if (!string.IsNullOrEmpty(text) && Directory.Exists(text) && LanguagePackXmlHelper.ContainsOnlyDownloadedFiles(text))
             {
                 Logger.LoggerMessage(Strings.RegistryKeyForLanguagePackFound);
                 flag = false;
                 this.previousDownloadedUpdatesRadioButton.Visible = true;
                 this.checkForUpdateYesRadioButton.Checked         = false;
                 this.checkForUpdateNoRadioButton.Checked          = false;
                 this.previousDownloadedUpdatesRadioButton.Checked = true;
             }
             if (flag)
             {
                 registryKey.DeleteValue("LanguagePackBundlePath", false);
                 this.previousDownloadedUpdatesRadioButton.Visible = false;
                 this.previousDownloadedUpdatesRadioButton.Checked = false;
             }
         }
     }
 }
示例#2
0
 // Token: 0x060001EA RID: 490 RVA: 0x0000B528 File Offset: 0x00009728
 public void StartDownloading()
 {
     try
     {
         using (DiskSpaceValidator diskSpaceValidator = new DiskSpaceValidator(500000000L, Environment.GetEnvironmentVariable("windir"), new Action <object>(this.UpdateDownloadUpdatesStatusBox)))
         {
             if (!diskSpaceValidator.Validate())
             {
                 throw new LanguagePackBundleLoadException(Strings.NotEnoughDiskSpace);
             }
         }
         List <DownloadFileInfo> downloadFileInfoFromXml = LanguagePackXmlHelper.GetDownloadFileInfoFromXml(this.localXMLVersioningPath, false);
         if (downloadFileInfoFromXml != null && downloadFileInfoFromXml.Count > 0)
         {
             if (Directory.Exists(this.downloadToDirectory))
             {
                 Directory.Delete(this.downloadToDirectory, true);
             }
             Directory.CreateDirectory(this.downloadToDirectory);
             this.webFileDownloader.StartDownloading(downloadFileInfoFromXml, this.downloadToDirectory);
         }
         else
         {
             this.UpdateDownloadUpdatesStatusBox(new LanguagePackBundleLoadException(Strings.InvalidLocalLPVersioningXML(this.localXMLVersioningPath)));
         }
     }
     catch (LanguagePackBundleLoadException message)
     {
         this.UpdateDownloadUpdatesStatusBox(message);
     }
     catch (LPVersioningValueException message2)
     {
         this.UpdateDownloadUpdatesStatusBox(message2);
     }
 }