- Timestamp:
- 12/15/08 01:26:25 (16 years ago)
- 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 58 58 59 59 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)); 71 61 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 } 74 69 } 75 70 … … 85 80 return GetEnumerator(); 86 81 } 82 83 public void Add(DataSet dataSet) { 84 dataSetList.Add(dataSet); 85 } 87 86 } 88 87 } -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/DataSetListView.Designer.cs
r957 r989 48 48 /// </summary> 49 49 private void InitializeComponent() { 50 this.components = new System.ComponentModel.Container();51 50 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(); 54 53 this.detailsGroupBox = new System.Windows.Forms.GroupBox(); 55 54 this.addButton = new System.Windows.Forms.Button(); 56 55 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();59 56 this.splitContainer1.Panel1.SuspendLayout(); 60 57 this.splitContainer1.Panel2.SuspendLayout(); 61 58 this.splitContainer1.SuspendLayout(); 62 this.agentsGroupBox.SuspendLayout(); 63 this.entryContextMenuStrip.SuspendLayout(); 59 this.dataSetsGroupBox.SuspendLayout(); 64 60 this.SuspendLayout(); 65 61 // … … 75 71 // splitContainer1.Panel1 76 72 // 77 this.splitContainer1.Panel1.Controls.Add(this. agentsGroupBox);73 this.splitContainer1.Panel1.Controls.Add(this.dataSetsGroupBox); 78 74 // 79 75 // splitContainer1.Panel2 … … 84 80 this.splitContainer1.TabIndex = 0; 85 81 // 86 // agentsGroupBox82 // dataSetsGroupBox 87 83 // 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"; 96 92 // 97 93 // agentTreeView 98 94 // 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); 106 101 // 107 102 // detailsGroupBox … … 137 132 this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click); 138 133 // 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 154 135 // 155 136 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); … … 157 138 this.Controls.Add(this.addButton); 158 139 this.Controls.Add(this.splitContainer1); 159 this.Name = " AgentListView";140 this.Name = "DataSetListView"; 160 141 this.Size = new System.Drawing.Size(276, 184); 161 142 this.splitContainer1.Panel1.ResumeLayout(false); 162 143 this.splitContainer1.Panel2.ResumeLayout(false); 163 144 this.splitContainer1.ResumeLayout(false); 164 this.agentsGroupBox.ResumeLayout(false); 165 this.entryContextMenuStrip.ResumeLayout(false); 145 this.dataSetsGroupBox.ResumeLayout(false); 166 146 this.ResumeLayout(false); 167 147 … … 171 151 172 152 private System.Windows.Forms.SplitContainer splitContainer1; 173 private System.Windows.Forms.GroupBox agentsGroupBox;153 private System.Windows.Forms.GroupBox dataSetsGroupBox; 174 154 private System.Windows.Forms.GroupBox detailsGroupBox; 175 155 private System.Windows.Forms.Button addButton; 176 private TreeView agentTreeView;156 private TreeView dataSetsTreeView; 177 157 private Button refreshButton; 178 private ContextMenuStrip entryContextMenuStrip;179 private ToolStripMenuItem exportAllResultsToolStripMenuItem;180 158 } 181 159 } -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/DataSetListView.cs
r957 r989 56 56 if(DataSetList == null) { 57 57 Caption = "Data Sets View"; 58 agentTreeView.Enabled = false;58 dataSetsTreeView.Enabled = false; 59 59 } else { 60 agentTreeView.Enabled = true;61 agentTreeView.Nodes.Clear();60 dataSetsTreeView.Enabled = true; 61 dataSetsTreeView.Nodes.Clear(); 62 62 foreach(DataSet dataSet in DataSetList) { 63 63 TreeNode node = new TreeNode(); … … 65 65 node.Tag = dataSet; 66 66 node.Nodes.Add("dummy"); 67 node.ContextMenuStrip = entryContextMenuStrip; 68 agentTreeView.Nodes.Add(node); 67 dataSetsTreeView.Nodes.Add(node); 69 68 } 70 69 } … … 73 72 #region Button Events 74 73 private void addButton_Click(object sender, EventArgs e) { 75 DataSetList.CreateDataSet(); 74 DataSet dataSet = new DataSet(); 75 DataSetList.Add(dataSet); 76 UpdateControls(); 76 77 } 77 78 #endregion 78 79 79 private void agentTreeView_AfterSelect(object sender, TreeViewEventArgs e) {80 private void dataSetsTreeView_AfterSelect(object sender, TreeViewEventArgs e) { 80 81 if(detailsGroupBox.Controls.Count > 0) 81 82 detailsGroupBox.Controls[0].Dispose(); 82 83 detailsGroupBox.Controls.Clear(); 83 84 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; 86 87 Control control = (Control)viewable.CreateView(); 87 88 detailsGroupBox.Controls.Add(control); -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/DataSetListView.resx
r957 r989 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </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>123 120 </root>
Note: See TracChangeset
for help on using the changeset viewer.