Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/11/09 19:30:54 (15 years ago)
Author:
gkronber
Message:

worked on CEDMA presentation layer (bubble chart, and collection of results) (#419)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/ResultsViewContainer.cs

    r1106 r1108  
    1818      InitializeComponent();
    1919      PopulateViewComboBox();
    20       showButton.Enabled = false;
     20      showButton.Enabled = viewComboBox.SelectedItem != null;
    2121    }
    2222
    2323    private void PopulateViewComboBox() {
    2424      DiscoveryService service = new DiscoveryService();
    25       Type[] viewTypes = service.GetTypes(typeof(IResultsView));
    26       foreach (Type t in viewTypes)
    27         viewComboBox.Items.Add(t);
     25      IResultsView[] views = service.GetInstances<IResultsView>();
     26      viewComboBox.DataSource = views;
     27      viewComboBox.ValueMember = "Name";
    2828    }
    2929
     
    3131      viewPanel.Controls.Clear();
    3232      try {
    33         Type type = (Type)viewComboBox.SelectedItem;
    34         IResultsView view = (IResultsView)Activator.CreateInstance(type);
     33        IResultsView view = (IResultsView)viewComboBox.SelectedItem;
    3534        Control control = view.Control;
    3635        viewPanel.Controls.Add(control);
Note: See TracChangeset for help on using the changeset viewer.