Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/20/08 12:45:43 (16 years ago)
Author:
gkronber
Message:

refresh the list of plugin-tags before calling OnUpgrade and OnInstall after installing new plugins (#12)

Location:
trunk/sources/HeuristicLab.PluginInfrastructure.GUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure.GUI/ManagerForm.cs

    r9 r10  
    650650      try {
    651651        ClearTemporaryFiles();
    652 
    653652        if(!DownloadFiles()) {
    654653          return;
    655654        }
    656 
    657655        OnDeletePlugins();
    658656        OnPreUpgradePlugins();
    659 
    660657        PluginManager.Manager.UnloadAllPlugins();
    661 
    662658        BackupOldFiles();
    663659        DeleteOldFiles();
    664660        InstallNewFiles();
    665 
    666661        PluginManager.Manager.LoadAllPlugins();
    667 
     662        InitializePlugins();
    668663        OnPostUpgradePlugins();
    669664        OnInstallPlugins();
    670 
    671         InitializePlugins();
    672 
    673665        ClearTemporaryFiles();
    674666      } catch(Exception e) {
    675667        ShowErrorDialog(e + "");
    676668      }
    677 
    678     }
    679 
     669    }
    680670    private void OnDeletePlugins() {
    681671      allTags.ForEach(delegate(PluginTag tag) {
     
    688678      });
    689679    }
    690 
    691680    private void OnInstallPlugins() {
    692681      allTags.ForEach(delegate(PluginTag tag) {
     
    839828          filesString += fs + "\n";
    840829        }
    841         DialogResult result = MessageBox.Show("Deleting: " + filesString, "Warning: deleting files", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
    842         if(result == DialogResult.OK) {
    843           foreach(string copiedFile in copiedFiles) {
    844             File.Delete(copiedFile);
    845           }
     830        foreach(string copiedFile in copiedFiles) {
     831          File.Delete(copiedFile);
    846832        }
    847833        throw e;
  • trunk/sources/HeuristicLab.PluginInfrastructure.GUI/PluginNameTransform.cs

    r8 r10  
    2525using ICSharpCode.SharpZipLib.Core;
    2626using System.Diagnostics;
     27using System.Windows.Forms;
    2728
    2829namespace HeuristicLab.PluginInfrastructure.GUI {
     
    3233  class PluginNameTransform : INameTransform{
    3334
    34     private string pluginDir = HeuristicLab.PluginInfrastructure.GUI.Properties.Settings.Default.PluginDir+"\\";   
     35    private string pluginDir = Application.StartupPath + "\\" + HeuristicLab.PluginInfrastructure.GUI.Properties.Settings.Default.PluginDir + "\\";   
    3536    #region INameTransform Members
    3637
Note: See TracChangeset for help on using the changeset viewer.