Free cookie consent management tool by TermsFeed Policy Generator

Changeset 989 for branches


Ignore:
Timestamp:
12/15/08 01:26:25 (16 years ago)
Author:
gkronber
Message:

worked on #419 (Refactor CEDMA plugins)

Location:
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core
Files:
4 edited

Legend:

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

    r957 r989  
    5858
    5959    private void ReloadList() {
    60       throw new NotImplementedException();
    61       //foreach( a in database.GetAgents()) {
    62       //  Agent newAgent = new Agent(Database, a.Id);
    63       //  newAgent.Name = a.Name;
    64       //  newAgent.Status = a.Status;
    65       //  lock(agentList) {
    66       //    agentList.Add(newAgent);
    67       //  }
    68       //  FireChanged();
    69       //}
    70     }
     60      IList<Statement> statements = store.Select(new Statement(Ontology.AnyEntity, Ontology.PredicateInstanceOf, Ontology.TypeDataSet));
    7161
    72     internal static void CreateDataSet() {
    73       throw new NotImplementedException();
     62      foreach(Statement s in statements) {
     63        DataSet d = new DataSet(store, s.Subject);
     64        lock(dataSetList) {
     65          dataSetList.Add(d);
     66        }
     67        FireChanged();
     68      }
    7469    }
    7570
     
    8580      return GetEnumerator();
    8681    }
     82
     83    public void Add(DataSet dataSet) {
     84      dataSetList.Add(dataSet);
     85    }
    8786  }
    8887}
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/DataSetListView.Designer.cs

    r957 r989  
    4848    /// </summary>
    4949    private void InitializeComponent() {
    50       this.components = new System.ComponentModel.Container();
    5150      this.splitContainer1 = new System.Windows.Forms.SplitContainer();
    52       this.agentsGroupBox = new System.Windows.Forms.GroupBox();
    53       this.agentTreeView = new System.Windows.Forms.TreeView();
     51      this.dataSetsGroupBox = new System.Windows.Forms.GroupBox();
     52      this.dataSetsTreeView = new System.Windows.Forms.TreeView();
    5453      this.detailsGroupBox = new System.Windows.Forms.GroupBox();
    5554      this.addButton = new System.Windows.Forms.Button();
    5655      this.refreshButton = new System.Windows.Forms.Button();
    57       this.entryContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
    58       this.exportAllResultsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    5956      this.splitContainer1.Panel1.SuspendLayout();
    6057      this.splitContainer1.Panel2.SuspendLayout();
    6158      this.splitContainer1.SuspendLayout();
    62       this.agentsGroupBox.SuspendLayout();
    63       this.entryContextMenuStrip.SuspendLayout();
     59      this.dataSetsGroupBox.SuspendLayout();
    6460      this.SuspendLayout();
    6561      //
     
    7571      // splitContainer1.Panel1
    7672      //
    77       this.splitContainer1.Panel1.Controls.Add(this.agentsGroupBox);
     73      this.splitContainer1.Panel1.Controls.Add(this.dataSetsGroupBox);
    7874      //
    7975      // splitContainer1.Panel2
     
    8480      this.splitContainer1.TabIndex = 0;
    8581      //
    86       // agentsGroupBox
     82      // dataSetsGroupBox
    8783      //
    88       this.agentsGroupBox.Controls.Add(this.agentTreeView);
    89       this.agentsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
    90       this.agentsGroupBox.Location = new System.Drawing.Point(0, 0);
    91       this.agentsGroupBox.Name = "agentsGroupBox";
    92       this.agentsGroupBox.Size = new System.Drawing.Size(135, 155);
    93       this.agentsGroupBox.TabIndex = 0;
    94       this.agentsGroupBox.TabStop = false;
    95       this.agentsGroupBox.Text = "&Agents";
     84      this.dataSetsGroupBox.Controls.Add(this.dataSetsTreeView);
     85      this.dataSetsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
     86      this.dataSetsGroupBox.Location = new System.Drawing.Point(0, 0);
     87      this.dataSetsGroupBox.Name = "dataSetsGroupBox";
     88      this.dataSetsGroupBox.Size = new System.Drawing.Size(135, 155);
     89      this.dataSetsGroupBox.TabIndex = 0;
     90      this.dataSetsGroupBox.TabStop = false;
     91      this.dataSetsGroupBox.Text = "&Data Sets";
    9692      //
    9793      // agentTreeView
    9894      //
    99       this.agentTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
    100       this.agentTreeView.Location = new System.Drawing.Point(3, 16);
    101       this.agentTreeView.Name = "agentTreeView";
    102       this.agentTreeView.Size = new System.Drawing.Size(129, 136);
    103       this.agentTreeView.TabIndex = 0;
    104       this.agentTreeView.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.agentTreeView_BeforeExpand);
    105       this.agentTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.agentTreeView_AfterSelect);
     95      this.dataSetsTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
     96      this.dataSetsTreeView.Location = new System.Drawing.Point(3, 16);
     97      this.dataSetsTreeView.Name = "agentTreeView";
     98      this.dataSetsTreeView.Size = new System.Drawing.Size(129, 136);
     99      this.dataSetsTreeView.TabIndex = 0;
     100      this.dataSetsTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.dataSetsTreeView_AfterSelect);
    106101      //
    107102      // detailsGroupBox
     
    137132      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
    138133      //
    139       // entryContextMenuStrip
    140       //
    141       this.entryContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
    142             this.exportAllResultsToolStripMenuItem});
    143       this.entryContextMenuStrip.Name = "entryContextMenuStrip";
    144       this.entryContextMenuStrip.Size = new System.Drawing.Size(166, 26);
    145       //
    146       // exportAllResultsToolStripMenuItem
    147       //
    148       this.exportAllResultsToolStripMenuItem.Name = "exportAllResultsToolStripMenuItem";
    149       this.exportAllResultsToolStripMenuItem.Size = new System.Drawing.Size(165, 22);
    150       this.exportAllResultsToolStripMenuItem.Text = "Export all results";
    151       this.exportAllResultsToolStripMenuItem.Click += new System.EventHandler(this.exportAllResultsToolStripMenuItem_Click);
    152       //
    153       // AgentListView
     134      // DataSetListView
    154135      //
    155136      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     
    157138      this.Controls.Add(this.addButton);
    158139      this.Controls.Add(this.splitContainer1);
    159       this.Name = "AgentListView";
     140      this.Name = "DataSetListView";
    160141      this.Size = new System.Drawing.Size(276, 184);
    161142      this.splitContainer1.Panel1.ResumeLayout(false);
    162143      this.splitContainer1.Panel2.ResumeLayout(false);
    163144      this.splitContainer1.ResumeLayout(false);
    164       this.agentsGroupBox.ResumeLayout(false);
    165       this.entryContextMenuStrip.ResumeLayout(false);
     145      this.dataSetsGroupBox.ResumeLayout(false);
    166146      this.ResumeLayout(false);
    167147
     
    171151
    172152    private System.Windows.Forms.SplitContainer splitContainer1;
    173     private System.Windows.Forms.GroupBox agentsGroupBox;
     153    private System.Windows.Forms.GroupBox dataSetsGroupBox;
    174154    private System.Windows.Forms.GroupBox detailsGroupBox;
    175155    private System.Windows.Forms.Button addButton;
    176     private TreeView agentTreeView;
     156    private TreeView dataSetsTreeView;
    177157    private Button refreshButton;
    178     private ContextMenuStrip entryContextMenuStrip;
    179     private ToolStripMenuItem exportAllResultsToolStripMenuItem;
    180158  }
    181159}
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/DataSetListView.cs

    r957 r989  
    5656      if(DataSetList == null) {
    5757        Caption = "Data Sets View";
    58         agentTreeView.Enabled = false;
     58        dataSetsTreeView.Enabled = false;
    5959      } else {
    60         agentTreeView.Enabled = true;
    61         agentTreeView.Nodes.Clear();
     60        dataSetsTreeView.Enabled = true;
     61        dataSetsTreeView.Nodes.Clear();
    6262        foreach(DataSet dataSet in DataSetList) {
    6363          TreeNode node = new TreeNode();
     
    6565          node.Tag = dataSet;
    6666          node.Nodes.Add("dummy");
    67           node.ContextMenuStrip = entryContextMenuStrip;
    68           agentTreeView.Nodes.Add(node);
     67          dataSetsTreeView.Nodes.Add(node);
    6968        }
    7069      }
     
    7372    #region Button Events
    7473    private void addButton_Click(object sender, EventArgs e) {
    75       DataSetList.CreateDataSet();
     74      DataSet dataSet = new DataSet();
     75      DataSetList.Add(dataSet);
     76      UpdateControls();
    7677    }
    7778    #endregion
    7879
    79     private void agentTreeView_AfterSelect(object sender, TreeViewEventArgs e) {
     80    private void dataSetsTreeView_AfterSelect(object sender, TreeViewEventArgs e) {
    8081      if(detailsGroupBox.Controls.Count > 0)
    8182        detailsGroupBox.Controls[0].Dispose();
    8283      detailsGroupBox.Controls.Clear();
    8384      detailsGroupBox.Enabled = false;
    84       if(agentTreeView.SelectedNode != null) {
    85         IViewable viewable = (IViewable)agentTreeView.SelectedNode.Tag;
     85      if(dataSetsTreeView.SelectedNode != null) {
     86        IViewable viewable = (IViewable)dataSetsTreeView.SelectedNode.Tag;
    8687        Control control = (Control)viewable.CreateView();
    8788        detailsGroupBox.Controls.Add(control);
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/DataSetListView.resx

    r957 r989  
    118118    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    119119  </resheader>
    120   <metadata name="entryContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    121     <value>17, 17</value>
    122   </metadata>
    123120</root>
Note: See TracChangeset for help on using the changeset viewer.