Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/05/10 01:14:31 (14 years ago)
Author:
swagner
Message:

Worked on OKB (#1174)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/OKBExperimentView.cs

    r4549 r4553  
    9191    protected override void SetEnabledStateOfControls() {
    9292      base.SetEnabledStateOfControls();
     93      algorithmComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (algorithmComboBox.Items.Count > 0);
     94      problemComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (problemComboBox.Items.Count > 0);
     95      tabControl.Enabled = Content != null;
    9396      executionTimeTextBox.Enabled = Content != null;
    9497      SetEnabledStateOfExecutableButtons();
     
    100103        algorithmComboBox.DataSource = OKBClient.Instance.Algorithms.Where(x => x.PlatformId == platform.Id).ToList();
    101104        algorithmComboBox.DisplayMember = "Name";
     105        algorithmComboBox.SelectedIndex = -1;
    102106        problemComboBox.DataSource = OKBClient.Instance.Problems.Where(x => x.PlatformId == platform.Id).ToList();
    103107        problemComboBox.DisplayMember = "Name";
     108        problemComboBox.SelectedIndex = -1;
    104109      }
    105110    }
     
    155160        Invoke(new EventHandler(Content_Prepared), sender, e);
    156161      else {
     162        resultsViewHost.Content = Content.Results;
    157163        ReadOnly = Locked = false;
    158164        SetEnabledStateOfExecutableButtons();
     
    191197    private void algorithmComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
    192198      Algorithm algorithm = algorithmComboBox.SelectedValue as Algorithm;
    193       if ((algorithm != null) && (Content != null)) {
    194         Content.LoadAlgorithm(algorithm.Id);
    195       }
     199      if (Content != null) Content.Load(algorithm);
    196200    }
    197201    private void problemComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
    198202      Problem problem = problemComboBox.SelectedValue as Problem;
    199       if ((problem != null) && (Content != null)) {
    200         Content.LoadProblem(problem.Id);
    201       }
     203      if (Content != null) Content.Load(problem);
    202204    }
    203205    private void prepareButton_Click(object sender, EventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.