Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/12/11 13:14:11 (14 years ago)
Author:
swagner
Message:

Worked on OKB (#1174)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBProblemView.cs

    r5660 r5667  
    3030  [View("OKBProblem View")]
    3131  [Content(typeof(OKBProblem), true)]
    32   public partial class OKBProblemView : NamedItemView {
     32  public sealed partial class OKBProblemView : NamedItemView {
    3333    public new OKBProblem Content {
    3434      get { return (OKBProblem)base.Content; }
     
    7070      base.SetEnabledStateOfControls();
    7171      problemComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (problemComboBox.Items.Count > 0);
    72       cloneProblemButton.Enabled = (Content != null) && (Content.Problem != null) && !ReadOnly && !Locked;
     72      cloneProblemButton.Enabled = (Content != null) && (Content.ProblemId != -1) && !ReadOnly && !Locked;
    7373      refreshButton.Enabled = (Content != null) && !ReadOnly && !Locked;
    7474      parameterCollectionView.Enabled = Content != null;
     
    8686      } else {
    8787        Cursor = Cursors.AppStarting;
    88         problemComboBox.Enabled = refreshButton.Enabled = false;
     88        problemComboBox.Enabled = cloneProblemButton.Enabled = refreshButton.Enabled = parameterCollectionView.Enabled = false;
    8989      }
    9090    }
     
    103103      if (InvokeRequired)
    104104        Invoke(new EventHandler(Content_ProblemChanged), sender, e);
    105       else {
    106         problemComboBox.SelectedItem = RunCreationClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
    107       }
     105      else
     106        OnContentChanged();
    108107    }
    109108    #endregion
     
    111110    #region Control Events
    112111    private void cloneProblemButton_Click(object sender, EventArgs e) {
    113       MainFormManager.MainForm.ShowContent((IContent)Content.Problem.Clone());
     112      MainFormManager.MainForm.ShowContent(Content.CloneProblem());
    114113    }
    115114    private void refreshButton_Click(object sender, System.EventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.