Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/08/11 13:18:49 (12 years ago)
Author:
sforsten
Message:

#1669: First version which can automatically generate data for some problems from http://www.vanillamodeling.com/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Views/3.4/DataAnalysisProblemView.cs

    r5834 r6968  
    2121
    2222using System;
     23using System.Linq;
    2324using System.Windows.Forms;
    2425using HeuristicLab.MainForm;
     
    4142    protected override void SetEnabledStateOfControls() {
    4243      base.SetEnabledStateOfControls();
    43       ImportButton.Enabled = !Locked && !ReadOnly && Content != null;
     44      importButton.Enabled = !Locked && !ReadOnly && Content != null;
    4445    }
    4546
     
    5455      }
    5556    }
     57
     58    private void loadButton_Click(object sender, EventArgs e) {
     59      if (benchmarkComboBox.SelectedItem != null)
     60        Content.CreateProblemDataFromBenchmark((IDataAnalysisBenchmarkProblemDataGenerator)benchmarkComboBox.SelectedItem);
     61    }
     62
     63    protected override void OnContentChanged() {
     64      base.OnContentChanged();
     65      benchmarkComboBox.Items.Clear();
     66      benchmarkComboBox.Items.AddRange(Content.GetBenchmarkProblemDataGenerators().OrderBy(b => b.ItemName).ToArray());
     67      if (benchmarkComboBox.Items.Count > 0)
     68        benchmarkComboBox.SelectedIndex = 0;
     69    }
    5670  }
    5771}
Note: See TracChangeset for help on using the changeset viewer.