Ignore:
Timestamp:
03/03/16 15:54:48 (5 years ago)
Author:
abeham
Message:

#2457: fixed bugs in suggestions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Views/3.3/ExpertSystemView.cs

    r13569 r13649  
    2020#endregion
    2121
     22using HeuristicLab.Common.Resources;
     23using HeuristicLab.Core.Views;
     24using HeuristicLab.MainForm;
     25using HeuristicLab.Optimization;
     26using HeuristicLab.Optimization.Views;
    2227using System;
    2328using System.ComponentModel;
     
    2631using System.Windows.Forms;
    2732using System.Windows.Forms.DataVisualization.Charting;
    28 using HeuristicLab.Common.Resources;
    29 using HeuristicLab.Core.Views;
    30 using HeuristicLab.MainForm;
    31 using HeuristicLab.Optimization;
    32 using HeuristicLab.Optimization.Views;
    3333
    3434namespace HeuristicLab.OptimizationExpertSystem.Views {
     
    104104          kbViewHost.Content = Content.KnowledgeBase;
    105105          problemInstancesView.Content = Content.ProblemInstances;
     106          algorithmViewHost.Content = Content.CurrentResult;
    106107        }
    107108      } finally { SuppressEvents = false; }
     
    161162            break;
    162163          case "ProblemInstances": problemInstancesView.Content = Content.ProblemInstances; break;
     164          case "CurrentResult": algorithmViewHost.Content = Content.CurrentResult; break;
    163165        }
    164166      } finally { SuppressEvents = false; }
     
    231233
    232234    private void AlgorithmStartButtonOnClick(object sender, EventArgs e) {
    233       var selectedInstance = (IAlgorithm)suggestedInstancesComboBox.SelectedItem;
    234       var clone = (IAlgorithm)selectedInstance.Clone();
    235       clone.Prepare(true);
    236       clone.Start();
    237       algorithmViewHost.Content = clone.Results;
     235      if (suggestedInstancesComboBox.SelectedIndex >= 0)
     236        Content.StartAlgorithmAsync(suggestedInstancesComboBox.SelectedIndex);
    238237    }
    239238
     
    268267      }
    269268    }
     269
     270    private void SuggestedInstancesComboBoxOnSelectedIndexChanged(object sender, EventArgs e) {
     271      SetEnabledStateOfControls();
     272    }
    270273  }
    271274}
Note: See TracChangeset for help on using the changeset viewer.