Changeset 394
- Timestamp:
- 07/23/08 00:28:11 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Core/Agent.cs
r393 r394 83 83 foreach(ResultEntry entry in Database.GetResults(Id)) { 84 84 Result result = (Result)DbPersistenceManager.Restore(entry.RawData); 85 result.Database = Database; 86 result.Id = entry.Id; 87 result.Summary = entry.Summary; 88 result.Description = entry.Description; 89 results.Add(result); 85 90 } 86 91 return results; -
trunk/sources/HeuristicLab.CEDMA.Core/AgentListView.cs
r393 r394 79 79 private void agentTreeView_BeforeExpand(object sender, TreeViewCancelEventArgs e) { 80 80 e.Node.Nodes.Clear(); 81 IAgent agent = (IAgent)e.Node.Tag; 82 foreach(IAgent subAgent in agent.SubAgents) { 83 TreeNode node = new TreeNode(); 84 node.Text = subAgent.Name; 85 node.Tag = subAgent; 86 node.Nodes.Add("dummy"); 87 e.Node.Nodes.Add(node); 88 } 89 foreach(IResult result in agent.Results) { 90 TreeNode node = new TreeNode(); 91 node.Text = result.Summary; 92 node.Tag = result; 93 node.Nodes.Add("dummy"); 94 e.Node.Nodes.Add(node); 81 if(e.Node.Tag is IAgent) { 82 IAgent agent = (IAgent)e.Node.Tag; 83 foreach(IAgent subAgent in agent.SubAgents) { 84 TreeNode node = new TreeNode(); 85 node.Text = subAgent.Name; 86 node.Tag = subAgent; 87 node.Nodes.Add("dummy"); 88 e.Node.Nodes.Add(node); 89 } 90 foreach(IResult result in agent.Results) { 91 TreeNode node = new TreeNode(); 92 node.Text = result.Summary; 93 node.Tag = result; 94 node.Nodes.Add("dummy"); 95 e.Node.Nodes.Add(node); 96 } 97 } else if(e.Node.Tag is IResult) { 98 IResult result = (IResult)e.Node.Tag; 99 foreach(IResult subResult in result.SubResults) { 100 TreeNode node = new TreeNode(); 101 node.Text = subResult.Summary; 102 node.Tag = subResult; 103 node.Nodes.Add("dummy"); 104 e.Node.Nodes.Add(node); 105 } 95 106 } 96 107 } -
trunk/sources/HeuristicLab.CEDMA.Core/Result.cs
r393 r394 34 34 public string Summary { get; set; } 35 35 public string Description { get; set; } 36 public IItem result;36 public IItem Item { get; set; } 37 37 public Result() 38 38 : base() { … … 51 51 foreach(ResultEntry entry in Database.GetSubResults(Id)) { 52 52 Result result = (Result)DbPersistenceManager.Restore(entry.RawData); 53 result.Database = Database; 54 result.Id = entry.Id; 55 result.Summary = entry.Summary; 56 result.Description = entry.Description; 57 results.Add(result); 53 58 } 54 59 return results; … … 59 64 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 60 65 XmlNode node = base.GetXmlNode(name, document, persistedObjects); 61 node.AppendChild(PersistenceManager.Persist(" Result", result, document, persistedObjects));66 node.AppendChild(PersistenceManager.Persist("Item", Item, document, persistedObjects)); 62 67 return node; 63 68 } … … 65 70 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) { 66 71 base.Populate(node, restoredObjects); 67 result = (IItem)PersistenceManager.Restore(node.SelectSingleNode("Result"), restoredObjects);72 Item = (IItem)PersistenceManager.Restore(node.SelectSingleNode("Item"), restoredObjects); 68 73 } 69 74 #endregion 70 75 71 // TASK: create class ResultView 72 //public override IView CreateView() { 73 // return new ResultView(this); 74 //} 76 public override IView CreateView() { 77 return Item.CreateView(); 78 } 75 79 } 76 80 } -
trunk/sources/HeuristicLab.CEDMA.DB/Database.cs
r393 r394 323 323 cnn.Open(); 324 324 using(DbCommand c = cnn.CreateCommand()) { 325 c.CommandText = "Select id, ParentAgentId, name, status, ControllerAgent, rawdata from Agent";325 c.CommandText = "Select id, name, status, ControllerAgent, rawdata from Agent where ParentAgentId isnull"; 326 326 using(DbDataReader r = c.ExecuteReader()) { 327 327 while(r.Read()) { 328 328 AgentEntry agent = new AgentEntry(); 329 agent.ParentAgentId = null; 329 330 agent.Id = r.GetInt32(0); 330 agent.ParentAgentId = r.IsDBNull(1) ? null : new Nullable<long>(r.GetInt32(1)); 331 agent.Name = r.IsDBNull(2)?"-":r.GetString(2); 332 agent.Status = (ProcessStatus)Enum.Parse(typeof(ProcessStatus), r.GetString(3)); 333 agent.ControllerAgent = r.GetBoolean(4); 334 agent.RawData = (byte[])r.GetValue(5); 331 agent.Name = r.IsDBNull(1)?"-":r.GetString(1); 332 agent.Status = (ProcessStatus)Enum.Parse(typeof(ProcessStatus), r.GetString(2)); 333 agent.ControllerAgent = r.GetBoolean(3); 334 agent.RawData = (byte[])r.GetValue(4); 335 335 agents.Add(agent); 336 336 } -
trunk/sources/HeuristicLab.CEDMA.Operators/HeuristicLab.CEDMA.Operators.csproj
r382 r394 54 54 </ItemGroup> 55 55 <ItemGroup> 56 <Compile Include="ScopeResultWriter.cs" /> 56 57 <Compile Include="HeuristicLabCedmaOperatorsPlugin.cs" /> 57 58 <Compile Include="OnGridProcessor.cs" /> -
trunk/sources/HeuristicLab.CEDMA.Operators/OnGridProcessor.cs
r393 r394 44 44 45 45 public override IOperation Apply(IScope scope) { 46 47 46 IOperatorGraph operatorGraph = scope.GetVariableValue<IOperatorGraph>("OperatorGraph", false); 48 47 string serverUrl = scope.GetVariableValue<StringData>("CedmaServerUri", true).Data;
Note: See TracChangeset
for help on using the changeset viewer.