- Timestamp:
- 08/14/08 16:47:20 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.CEDMA.Core
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Core/AgentListView.Designer.cs
r510 r514 48 48 /// </summary> 49 49 private void InitializeComponent() { 50 this.components = new System.ComponentModel.Container(); 50 51 this.splitContainer1 = new System.Windows.Forms.SplitContainer(); 51 52 this.agentsGroupBox = new System.Windows.Forms.GroupBox(); … … 54 55 this.addButton = new System.Windows.Forms.Button(); 55 56 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(); 56 59 this.splitContainer1.Panel1.SuspendLayout(); 57 60 this.splitContainer1.Panel2.SuspendLayout(); 58 61 this.splitContainer1.SuspendLayout(); 59 62 this.agentsGroupBox.SuspendLayout(); 63 this.entryContextMenuStrip.SuspendLayout(); 60 64 this.SuspendLayout(); 61 65 // … … 133 137 this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click); 134 138 // 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 // 135 153 // AgentListView 136 154 // … … 145 163 this.splitContainer1.ResumeLayout(false); 146 164 this.agentsGroupBox.ResumeLayout(false); 165 this.entryContextMenuStrip.ResumeLayout(false); 147 166 this.ResumeLayout(false); 148 167 … … 157 176 private TreeView agentTreeView; 158 177 private Button refreshButton; 178 private ContextMenuStrip entryContextMenuStrip; 179 private ToolStripMenuItem exportAllResultsToolStripMenuItem; 159 180 } 160 181 } -
trunk/sources/HeuristicLab.CEDMA.Core/AgentListView.cs
r510 r514 65 65 node.Tag = agent; 66 66 node.Nodes.Add("dummy"); 67 node.ContextMenuStrip = entryContextMenuStrip; 67 68 agentTreeView.Nodes.Add(node); 68 69 } … … 84 85 node.Text = subAgent.Name; 85 86 node.Tag = subAgent; 87 node.ContextMenuStrip = entryContextMenuStrip; 86 88 node.Nodes.Add("dummy"); 87 89 e.Node.Nodes.Add(node); … … 123 125 UpdateControls(); 124 126 } 127 128 private void exportAllResultsToolStripMenuItem_Click(object sender, EventArgs e) { 129 TreeNode node = agentTreeView.SelectedNode; 130 Agent agent = (Agent)node.Tag; 131 ResultExporter exporter = new ResultExporter(); 132 ResultTable table = new ResultTable(); 133 exporter.Export(agent, table); 134 135 using(System.IO.FileStream s = new System.IO.FileStream("exported-results.txt", System.IO.FileMode.Create)) { 136 table.Write(s); 137 } 138 } 125 139 } 126 140 } -
trunk/sources/HeuristicLab.CEDMA.Core/AgentListView.resx
r357 r514 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> 120 123 </root> -
trunk/sources/HeuristicLab.CEDMA.Core/HeuristicLab.CEDMA.Core.csproj
r513 r514 62 62 <SubType>UserControl</SubType> 63 63 </Compile> 64 <Compile Include="ResultTable.cs" /> 65 <Compile Include="ResultExporter.cs" /> 64 66 <Compile Include="DatabaseOperatorLibrary.cs" /> 65 67 <Compile Include="DatabaseOperatorLibraryView.cs"> -
trunk/sources/HeuristicLab.CEDMA.Core/IResult.cs
r393 r514 29 29 namespace HeuristicLab.CEDMA.Core { 30 30 public interface IResult : IDatabaseItem, IViewable { 31 IItem Item { get; } 31 32 string Summary { get; } 32 33 string Description { get; } -
trunk/sources/HeuristicLab.CEDMA.Core/Result.cs
r503 r514 34 34 public string Summary { get; set; } 35 35 public string Description { get; set; } 36 public IItem Item { get; set; } 36 private IItem item; 37 public IItem Item { 38 get { 39 if(item == null) { 40 byte[] rawData = Database.GetResultRawData(Id); 41 item = (IItem)PersistenceManager.RestoreFromGZip(rawData); 42 } 43 return item; 44 } 45 } 37 46 public Result() 38 47 : base() { … … 60 69 61 70 public IView CreateView() { 62 if(Item == null) {63 byte[] rawData = Database.GetResultRawData(Id);64 Item = (IItem)PersistenceManager.RestoreFromGZip(rawData);65 }66 71 return Item.CreateView(); 67 72 }
Note: See TracChangeset
for help on using the changeset viewer.