Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/12/09 17:45:45 (15 years ago)
Author:
gkronber
Message:

Worked on plugin infrastructure refactoring. (Fully functional revision). #799

Location:
branches/PluginInfrastructure Refactoring/HeuristicLab
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/PluginInfrastructure Refactoring/HeuristicLab/MainForm.cs

    r2481 r2488  
    3737    private ListViewItem pluginManagerListViewItem;
    3838    private bool abortRequested;
     39    private PluginManager pluginManager;
    3940
    4041    public MainForm()
     
    4344
    4445      abortRequested = false;
    45       PluginManager pluginManager = new PluginManager(HeuristicLab.PluginInfrastructure.Properties.Settings.Default.PluginDir);
     46      pluginManager = new PluginManager(HeuristicLab.PluginInfrastructure.Properties.Settings.Default.PluginDir);
    4647      SplashScreen splashScreen = new SplashScreen(pluginManager, 1000, "Loading HeuristicLab...");
    4748      splashScreen.Owner = this;
     
    8384        if (selected == pluginManagerListViewItem) {
    8485          try {
    85             Cursor = Cursors.AppStarting;
    86             ManagerForm form = new ManagerForm();
    87             this.Visible = false;
    88             form.ShowDialog(this);
    89             // RefreshApplicationsList();
    90             this.Visible = true;
     86            //Cursor = Cursors.AppStarting;
     87            //ManagerForm form = new ManagerForm();
     88            //this.Visible = false;
     89            //form.ShowDialog(this);
     90            //// RefreshApplicationsList();
     91            //this.Visible = true;
    9192          }
    9293          finally {
     
    9596        } else {
    9697          ApplicationDescription app = (ApplicationDescription)applicationsListView.SelectedItems[0].Tag;
    97           SplashScreen splashScreen = new SplashScreen(2000, "Loading " + app.Name);
     98          SplashScreen splashScreen = new SplashScreen(pluginManager, 2000, "Loading " + app.Name);
    9899          splashScreen.Owner = this;
    99100          splashScreen.Show();
    100           PluginManager.Manager.Action += new PluginManagerActionEventHandler(splashScreen.Manager_Action);
    101101          Thread t = new Thread(delegate() {
    102102            bool stopped = false;
     
    104104              try {
    105105                if (!abortRequested)
    106                   PluginManager.Manager.Run(app);
     106                  pluginManager.Run(app);
    107107                stopped = true;
    108108              }
  • branches/PluginInfrastructure Refactoring/HeuristicLab/Program.cs

    r1107 r2488  
    3838          Application.Run(new MainForm());
    3939        } else if (args.Length == 1) {  // start specific application
    40           PluginManager.Manager.Initialize();
     40          //PluginManager.Manager.Initialize();
    4141
    42           ApplicationInfo app = null;
    43           foreach (ApplicationInfo info in PluginManager.Manager.InstalledApplications) {
    44             if (info.Name == args[0])
    45               app = info;
    46           }
    47           if (app == null) {  // application not found
    48             MessageBox.Show("Cannot start application.\nApplication " + args[0] + " is not installed.\n\nStarting HeuristicLab in normal mode ...",
    49                             "HeuristicLab",
    50                             MessageBoxButtons.OK,
    51                             MessageBoxIcon.Warning);
    52             Application.EnableVisualStyles();
    53             Application.SetCompatibleTextRenderingDefault(false);
    54             Application.Run(new MainForm());
    55           } else {
    56             PluginManager.Manager.Run(app);
    57           }
     42          //ApplicationInfo app = null;
     43          //foreach (ApplicationInfo info in PluginManager.Manager.InstalledApplications) {
     44          //  if (info.Name == args[0])
     45          //    app = info;
     46          //}
     47          //if (app == null) {  // application not found
     48          //  MessageBox.Show("Cannot start application.\nApplication " + args[0] + " is not installed.\n\nStarting HeuristicLab in normal mode ...",
     49          //                  "HeuristicLab",
     50          //                  MessageBoxButtons.OK,
     51          //                  MessageBoxIcon.Warning);
     52          //  Application.EnableVisualStyles();
     53          //  Application.SetCompatibleTextRenderingDefault(false);
     54          //  Application.Run(new MainForm());
     55          //} else {
     56          //  PluginManager.Manager.Run(app);
     57          //}
    5858        }
    5959      }
Note: See TracChangeset for help on using the changeset viewer.