Changeset 5896


Ignore:
Timestamp:
03/30/11 18:13:04 (11 years ago)
Author:
mkommend
Message:

#1451: Corrected implementation of ResultCollectionView and changed default views for Results.

Location:
trunk/sources/HeuristicLab.Optimization.Views/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ResultCollectionView.cs

    r5875 r5896  
    4040      InitializeComponent();
    4141      itemsGroupBox.Text = "Results";
     42      viewHost.ViewsLabelVisible = false;
    4243      base.ReadOnly = true;
    4344    }
     
    4748    }
    4849
    49     protected override void itemsListView_SelectedIndexChanged(object sender, EventArgs e) {
    50       viewHost.ViewType = typeof(ResultValueView);
    51       base.itemsListView_SelectedIndexChanged(sender, e);
    52     }
    53     protected override void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) {
    54       viewHost.ViewType = typeof(ResultValueView);
    55       base.showDetailsCheckBox_CheckedChanged(sender, e);
     50    protected override void itemsListView_DoubleClick(object sender, EventArgs e) {
     51      if (itemsListView.SelectedItems.Count == 1) {
     52        IResult result = itemsListView.SelectedItems[0].Tag as IResult;
     53        if (result != null) {
     54          IContentView view = MainFormManager.MainForm.ShowContent(result, typeof(ResultView));
     55          if (view != null) {
     56            view.ReadOnly = ReadOnly;
     57            view.Locked = Locked;
     58          }
     59        }
     60      }
    5661    }
    5762  }
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ResultValueView.cs

    r5875 r5896  
    2727namespace HeuristicLab.Optimization.Views {
    2828  [View("Result Value View")]
    29   [Content(typeof(Result), false)]
     29  [Content(typeof(Result), true)]
    3030  [Content(typeof(IResult), false)]
    3131  public sealed partial class ResultValueView : ItemView {
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ResultView.cs

    r5445 r5896  
    3131  /// </summary>
    3232  [View("Result View")]
    33   [Content(typeof(Result), true)]
     33  [Content(typeof(Result), false)]
    3434  [Content(typeof(IResult), false)]
    3535  public sealed partial class ResultView : NamedItemView {
Note: See TracChangeset for help on using the changeset viewer.