Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/23/08 00:28:11 (16 years ago)
Author:
gkronber
Message:
  • implemented operator to store a whole scope as an result item into the cedma-db.
  • worked on AgentListView to display results as sub-nodes of agents.

(ticket #191)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Core/AgentListView.cs

    r393 r394  
    7979    private void agentTreeView_BeforeExpand(object sender, TreeViewCancelEventArgs e) {
    8080      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        }
    95106      }
    96107    }
Note: See TracChangeset for help on using the changeset viewer.