Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/27/08 17:14:46 (16 years ago)
Author:
aleitner
Message:

Fill ListView and TreeView with content (#380)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.cs

    r834 r844  
    4242    List<Job> jobs = null;
    4343    List<UserGroup> userGroups = null;
    44    
     44
    4545    public HiveServerManagementConsole() {
    4646      InitializeComponent();
     47      addItems();
     48    }
    4749
     50    private void addItems() {
    4851      IClientManager clientManager =
    49         ServiceLocator.GetClientManager();
     52          ServiceLocator.GetClientManager();
    5053
    5154      IJobManager jobManager =
     
    5558        ServiceLocator.GetUserRoleManager();
    5659
    57      // clients = clientManager.GetAllClientGroups();
     60      clientManager.GetAllUpTimeStatistics();
     61      clients = clientManager.GetAllClientGroups();
    5862      jobs = jobManager.GetAllJobs();
    5963      userGroups = userRoleManager.GetAllUserGroups();
    60      // foreach (ClientGroup cg in clients) {
    61      //   tvClientControl.Nodes.Add(cg.Name);
     64      lvClientControl.Items.Clear();
     65      int count = 0;
     66      foreach (ClientGroup cg in clients) {
     67        tvClientControl.Nodes.Add(cg.Name);
     68        ListViewGroup lvg = new ListViewGroup(cg.Name, HorizontalAlignment.Left);
     69        lvClientControl.Groups.Add(lvg);
    6270        foreach (ClientInfo ci in clientManager.GetAllClients()) {
    63           tvClientControl.SelectedNode.Nodes.Add(ci.Name);
     71          tvClientControl.Nodes[tvClientControl.Nodes.Count - 1].Nodes.Add(ci.Name);
     72          lvClientControl.Groups[lvClientControl.Groups.Count].Items.Add(new ListViewItem(ci.Name, count));
     73          count = (count + 1) % 3;
    6474        }
    65      // }
     75      }
    6676      foreach (Job job in jobs) {
    6777        tvJobControl.Nodes.Add(job.JobId.ToString());
     
    7080        tvUserControl.Nodes.Add(ug.UserGroupId.ToString());
    7181      }
    72 
    7382    }
    7483
Note: See TracChangeset for help on using the changeset viewer.