/// <summary> /// Downloading of plugin updates has been compleeted. /// </summary> /// <param name="newpluginfile"></param> private void DownloadUpdatesPluginsCompleet(string[] compressedpluginfiles) { bool updatesinstalled = false; RSAVerify rsaverify = new RSAVerify(); for (int i = 0; i < compressedpluginfiles.Length; i++) { int pluginposition = this.updatedplugins[i]; if (rsaverify.CheckFileSignatureAndDisplayErrors(compressedpluginfiles[i], this.updatableplugins[pluginposition].Signature)) { this.DecompressDownload(compressedpluginfiles[i]); updatesinstalled = true; } } for (int p = this.updatedplugins.Count - 1; p >= 0; p--) { this.chxlbxPluginUpdates.Items.RemoveAt(p); } if (updatesinstalled) { PluginsManager.LoadPlugins(); this.pluginGrid.DrawAllPluginsDetails(this.tabPagePluginsInstalled.ClientRectangle.Width); this.btnRestartProgram.Visible = true; } if (this.chxlbxPluginUpdates.Items.Count > 0) { this.btnUpdatePlugins.Enabled = true; } this.chxlbxPluginUpdates.Enabled = true; }
/// <summary> /// Download compleet, run update. /// This only one setup file so the first element of the array with newfiles is launched. /// </summary> /// <param name="newfiles">Array with returned new files</param> private static void frmupdater_DownloadCompleetSuccesfull(string[] newfiles) { if (newfiles.Length < 1) { throw new Exception("No files downloaded"); } RSAVerify rsaverify = new RSAVerify(); if (!rsaverify.CheckFileSignatureAndDisplayErrors(newfiles[0], Program.updateprogramrsasignature)) { return; } if (Settings.UpdatecheckUseGPG) { GPGVerifyWrapper gpgverif = new GPGVerifyWrapper(); if (gpgverif.VerifyDownload(newfiles[0], newfiles[1])) { ExecDownload(newfiles[0]); } } else { ExecDownload(newfiles[0]); } }
/// <summary> /// Downloading of plugin compleet. /// </summary> /// <param name="newfiles">Array of files downloads.</param> private void downloader_DownloadCompleet(string[] newpluginfile) { RSAVerify rsaverify = new RSAVerify(); if (!rsaverify.CheckFileSignatureAndDisplayErrors(newpluginfile[0], this.selectedplugindetails.Signature)) { return; } this.DecompressDownload(newpluginfile[0]); PluginsManager.LoadPlugins(); this.pluginGrid.DrawAllPluginsDetails(this.tabPagePluginsInstalled.ClientRectangle.Width); this.tabControlPlugins.SelectedTab = this.tabPagePluginsInstalled; }