Ignore:
Timestamp:
12/15/08 10:48:49 (14 years ago)
Author:
gkronber
Message:

Added basic design for ProblemView #419 (Refactor CEDMA plugins)

File:
1 edited

Legend:

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

    r989 r992  
    3131namespace HeuristicLab.CEDMA.Core {
    3232  public partial class DataSetListView : ViewBase {
    33     public DataSetList DataSetList{
     33    public DataSetList DataSetList {
    3434      get { return (DataSetList)Item; }
    3535      set { base.Item = value; }
     
    5656      if(DataSetList == null) {
    5757        Caption = "Data Sets View";
    58         dataSetsTreeView.Enabled = false;
     58        dataSetsListView.Enabled = false;
    5959      } else {
    60         dataSetsTreeView.Enabled = true;
    61         dataSetsTreeView.Nodes.Clear();
     60        dataSetsListView.Enabled = true;
     61        dataSetsListView.Items.Clear();
    6262        foreach(DataSet dataSet in DataSetList) {
    63           TreeNode node = new TreeNode();
     63          ListViewItem node = new ListViewItem();
    6464          node.Text = dataSet.Name;
    6565          node.Tag = dataSet;
    66           node.Nodes.Add("dummy");
    67           dataSetsTreeView.Nodes.Add(node);
     66          dataSetsListView.Items.Add(node);
    6867        }
    6968      }
     
    7372    private void addButton_Click(object sender, EventArgs e) {
    7473      DataSet dataSet = new DataSet();
     74      dataSet.Store = DataSetList.Store;
    7575      DataSetList.Add(dataSet);
    7676      UpdateControls();
    7777    }
    78     #endregion
    79 
    80     private void dataSetsTreeView_AfterSelect(object sender, TreeViewEventArgs e) {
    81       if(detailsGroupBox.Controls.Count > 0)
    82         detailsGroupBox.Controls[0].Dispose();
    83       detailsGroupBox.Controls.Clear();
    84       detailsGroupBox.Enabled = false;
    85       if(dataSetsTreeView.SelectedNode != null) {
    86         IViewable viewable = (IViewable)dataSetsTreeView.SelectedNode.Tag;
     78    private void dataSetsListView_SelectedIndexChanged(object sender, EventArgs e) {
     79      if(dataSetsListView.SelectedItems.Count > 0) {
     80        if(detailsGroupBox.Controls.Count > 0)
     81          detailsGroupBox.Controls[0].Dispose();
     82        detailsGroupBox.Controls.Clear();
     83        detailsGroupBox.Enabled = false;
     84        IViewable viewable = (IViewable)dataSetsListView.SelectedItems[0].Tag;
    8785        Control control = (Control)viewable.CreateView();
    8886        detailsGroupBox.Controls.Add(control);
     
    9189      }
    9290    }
     91    #endregion
     92
    9393
    9494    private void refreshButton_Click(object sender, EventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.