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)

Location:
trunk/sources/HeuristicLab.Hive.Server.Console
Files:
4 edited

Legend:

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

    r831 r844  
    2424    /// </summary>
    2525    private void InitializeComponent() {
     26      this.components = new System.ComponentModel.Container();
     27      System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
     28            "",
     29            "Test"}, -1);
     30      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HiveServerManagementConsole));
    2631      this.menuStrip1 = new System.Windows.Forms.MenuStrip();
    2732      this.informationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     
    3136      this.scClientControl = new System.Windows.Forms.SplitContainer();
    3237      this.tvClientControl = new System.Windows.Forms.TreeView();
    33       this.listView1 = new System.Windows.Forms.ListView();
     38      this.lvClientControl = new System.Windows.Forms.ListView();
    3439      this.tpJobControl = new System.Windows.Forms.TabPage();
    3540      this.scJobControl = new System.Windows.Forms.SplitContainer();
     
    4247      this.treeView2 = new System.Windows.Forms.TreeView();
    4348      this.listView2 = new System.Windows.Forms.ListView();
     49      this.imageList1 = new System.Windows.Forms.ImageList(this.components);
    4450      this.menuStrip1.SuspendLayout();
    4551      this.tcManagementConsole.SuspendLayout();
     
    119125      // scClientControl.Panel2
    120126      //
    121       this.scClientControl.Panel2.Controls.Add(this.listView1);
     127      this.scClientControl.Panel2.Controls.Add(this.lvClientControl);
    122128      this.scClientControl.Size = new System.Drawing.Size(637, 346);
    123129      this.scClientControl.SplitterDistance = 139;
     
    132138      this.tvClientControl.TabIndex = 0;
    133139      //
    134       // listView1
    135       //
    136       this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
    137       this.listView1.Location = new System.Drawing.Point(0, 0);
    138       this.listView1.Name = "listView1";
    139       this.listView1.Size = new System.Drawing.Size(494, 346);
    140       this.listView1.TabIndex = 0;
    141       this.listView1.UseCompatibleStateImageBehavior = false;
     140      // lvClientControl
     141      //
     142      this.lvClientControl.Dock = System.Windows.Forms.DockStyle.Fill;
     143      this.lvClientControl.ImeMode = System.Windows.Forms.ImeMode.Off;
     144      this.lvClientControl.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
     145            listViewItem1});
     146      this.lvClientControl.LargeImageList = this.imageList1;
     147      this.lvClientControl.Location = new System.Drawing.Point(0, 0);
     148      this.lvClientControl.Name = "lvClientControl";
     149      this.lvClientControl.Size = new System.Drawing.Size(494, 346);
     150      this.lvClientControl.TabIndex = 0;
     151      this.lvClientControl.UseCompatibleStateImageBehavior = false;
    142152      //
    143153      // tpJobControl
     
    248258      this.listView2.TabIndex = 0;
    249259      this.listView2.UseCompatibleStateImageBehavior = false;
     260      //
     261      // imageList1
     262      //
     263      this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
     264      this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
     265      this.imageList1.Images.SetKeyName(0, "Monitor_red.png");
     266      this.imageList1.Images.SetKeyName(1, "Monitor_yellow.png");
     267      this.imageList1.Images.SetKeyName(2, "Monitor_green.png");
    250268      //
    251269      // HiveServerManagementConsole
     
    291309    private System.Windows.Forms.TabPage tpUserControl;
    292310    private System.Windows.Forms.TreeView tvClientControl;
    293     private System.Windows.Forms.ListView listView1;
     311    private System.Windows.Forms.ListView lvClientControl;
    294312    private System.Windows.Forms.SplitContainer scJobControl;
    295313    private System.Windows.Forms.ListView listView3;
     
    300318    private System.Windows.Forms.TreeView tvUserControl;
    301319    private System.Windows.Forms.ListView listView4;
     320    private System.Windows.Forms.ImageList imageList1;
    302321  }
    303322}
  • 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
  • trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.resx

    r794 r844  
    121121    <value>17, 17</value>
    122122  </metadata>
     123  <metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     124    <value>126, 17</value>
     125  </metadata>
     126  <data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
     127    <value>
     128        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
     129        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
     130        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAM
     131        EQAAAk1TRnQBSQFMAgEBAwEAAQUBAAEEAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
     132        AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
     133        AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
     134        AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
     135        AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
     136        AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
     137        AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
     138        ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
     139        AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
     140        AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
     141        AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
     142        AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
     143        AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
     144        AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
     145        AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
     146        AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
     147        ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
     148        Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
     149        AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
     150        AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
     151        AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
     152        ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
     153        Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
     154        AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
     155        AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
     156        AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
     157        AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
     158        AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
     159        AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wEADvkDzw/5DjgDzw84
     160        DigDzw8oIAAL+QG1Ae4B8AHxAfACvAEHAbUM+Qs4AbUB7gHwAfEB8AK8AQcBtQw4CygBtQHuAfAB8QHw
     161        ArwBBwG1DCggAAn5Ae8C8APxAfABvALxAgcB7wr5CTgB7wLwA/EB8AG8AvECBwHvCjgJKAHvAvAD8QHw
     162        AbwC8QIHAe8KKCAACPkBBwO8AfAC8QHwAbwB8QG8AgcB7wEHAa4I+Qg4AQcDvAHwAvEB8AG8AfEBvAIH
     163        Ae8BBwGuCDgIKAEHA7wB8ALxAfABvAHxAbwCBwHvAQcBrggoIAAH+QQHAbwB8ALxAfABvAHwAgcC7wGS
     164        Ae8I+Qc4BAcBvAHwAvEB8AG8AfACBwLvAZIB7wg4BygEBwG8AfAC8QHwAbwB8AIHAu8BkgHvCCggAAf5
     165        Ae8EBwG8AvABvAMHAe8B9wLtAe8I+Qc4Ae8EBwG8AvABvAMHAe8B9wLtAe8IOAcoAe8EBwG8AvABvAMH
     166        Ae8B9wLtAe8IKCAACPkFBwK8AgcB7wGSA+wB9wHsCPkIOAUHArwCBwHvAZID7AH3AewIOAgoBQcCvAIH
     167        Ae8BkgPsAfcB7AgoIAAJ+QH3AQcD7wH3Ae0B7AHrAm0B7AH3Ae8C9wEHAa4F+Qk4AfcBBwPvAfcB7QHs
     168        AesCbQHsAfcB7wL3AQcBrgU4CSgB9wEHA+8B9wHtAewB6wJtAewB9wHvAvcBBwGuBSggAAr5AYYBrgLt
     169        A/gB7AHtAfcB7wEHAe4B8AG8AQcB7QX5CjgBhgGuAu0D+AHsAe0B9wHvAQcB7gHwAbwBBwHtBTgKKAGG
     170        Aa4C7QP4AewB7QH3Ae8BBwHuAfABvAEHAe0FKCAADPkBrgHtAewC7QHvAQcDvAEHAbUCBwHtBfkMOAGu
     171        Ae0B7ALtAe8BBwO8AQcBtQIHAe0FOAwoAa4B7QHsAu0B7wEHA7wBBwG1AgcB7QUoIAAI+QGGAa4B7QGS
     172        AhwB7wMHAbUBzwKnAoUBzwG8AZIF+Qg4AYYBrgHtAZICHAHvAwcBtQHPAqcChQHPAbwBkgU4CCgBhgGu
     173        Ae0BkgIcAe8DBwG1Ac8CpwKFAc8BvAGSBSggAAP5Aa4B7AHtAe8FBwHvAbUBzwGGAqYDhQKmAccBzwHw
     174        AfcF+QM4Aa4B7AHtAe8FBwHvAbUBzwGGAqYDhQKmAccBzwHwAfcFOAMoAa4B7AHtAe8FBwHvAbUBzwGG
     175        AqYDhQKmAccBzwHwAfcFKCAAAvkB7QEcAe8DBwG1Aa4ChgGFAQQChQGmBqcBxwHPAfAB9wX5AjgB7QEc
     176        Ae8DBwG1Aa4ChgGFAQQChQGmBqcBxwHPAfAB9wU4AigB7QEcAe8DBwG1Aa4ChgGFAQQChQGmBqcBxwHP
     177        AfAB9wUoIAAB+QHPAvcBtQGuAYYFBASFCKcBrQG8Ae8F+QE4Ac8C9wG1Aa4BhgUEBIUIpwGtAbwB7wU4
     178        ASgBzwL3AbUBrgGGBQQEhQinAa0BvAHvBSggAAL5AfcIBASFAaYBpwitAbwB7wGnBPkCOAH3CAQEhQGm
     179        AacIrQG8Ae8BpwQ4AigB9wgEBIUBpgGnCK0BvAHvAacEKCAAAvkB7wKmAYYCpgIEBYUBxwGtCM8BvAEH
     180        Aa4E+QI4Ae8CpgGGAqYCBAWFAccBrQjPAbwBBwGuBDgCKAHvAqYBhgKmAgQFhQHHAa0IzwG8AQcBrgQo
     181        IAAC+QHvBYYBpgWFAaEBxwbPA+YB7gEHAa4E+QI4Ae8FhgGmBYUBoQHHBs8D5gHuAQcBrgQ4AigB7wWG
     182        AaYFhQGhAccGzwPmAe4BBwGuBCggAAL5Ae8BrgSGBYUCoQGnArQG1QHmAQkB7gHtBPkCOAHvAa4EhgWF
     183        AqEBpwK0BtUB5gEJAe4B7QQ4AigB7wGuBIYFhQKhAacCtAbVAeYBCQHuAe0EKCAAAvkB7wGuBIYEhQGh
     184        AccBoQGtCNYB1QEJAbwB7QT5AjgB7wGuBIYEhQGhAccBoQGtCNYB1QEJAbwB7QQ4AigB7wGuBIYEhQGh
     185        AccBoQGtCNYB1QEJAbwB7QQoIAAC+QHvAe0BhgGuAYsBpgOFAaECxwGhAc8K1gHwAfcE+QI4Ae8B7QGG
     186        Aa4BiwGmA4UBoQLHAaEBzwrWAfAB9wQ4AigB7wHtAYYBrgGLAaYDhQGhAscBoQHPCtYB8AH3BCggAAL5
     187        AbUB9wGGAc8BrQSFAaEDxwHVCAkB3AHWAfAB9wT5AjgBtQH3AYYBzwGtBIUBoQPHAdUICQHcAdYB8AH3
     188        BDgCKAG1AfcBhgHPAa0EhQGhA8cB1QgJAdwB1gHwAfcEKCAAAvkBzwHvAYYBzwGGA4UFxwHWAd0GCQHd
     189        AgkB8QH3BPkCOAHPAe8BhgHPAYYDhQXHAdYB3QYJAd0CCQHxAfcEOAIoAc8B7wGGAc8BhgOFBccB1gHd
     190        BgkB3QIJAfEB9wQoIAAD+QHvAYYBzwGmAoUFxwHIAQkJ3QEJAfEB7wHPA/kDOAHvAYYBzwGmAoUFxwHI
     191        AQkJ3QEJAfEB7wHPAzgDKAHvAYYBzwGmAoUFxwHIAQkJ3QEJAfEB7wHPAyggAAP5Ae8BhgGtAoUFxwFC
     192        Ac4F3QUZAQkB8QHvAa4D+QM4Ae8BhgGtAoUFxwFCAc4F3QUZAQkB8QHvAa4DOAMoAe8BhgGtAoUFxwFC
     193        Ac4F3QUZAQkB8QHvAa4DKCAAA/kB7wKGAoUFxwFCAdUKGQEJAfIBBwGuA/kDOAHvAoYChQXHAUIB1QoZ
     194        AQkB8gEHAa4DOAMoAe8ChgKFBccBQgHVChkBCQHyAQcBrgMoIAAD+QHvAYYChQGhBccBQgHWAfQFGQT0
     195        ARkB8QG8Aa4D+QM4Ae8BhgKFAaEFxwFCAdYB9AUZBPQBGQHxAbwBrgM4AygB7wGGAoUBoQXHAUIB1gH0
     196        BRkE9AEZAfEBvAGuAyggAAP5Ae8BiwKFAaEExwFCAcgB3Qf0AxkBCQHdAfEB7QP5AzgB7wGLAoUBoQTH
     197        AUIByAHdB/QDGQEJAd0B8QHtAzgDKAHvAYsChQGhBMcBQgHIAd0H9AMZAQkB3QHxAe0DKCAAA/kBtQGu
     198        AoUFxwH8Ac4CGQTdBgkB8QHzAe0D+QM4AbUBrgKFBccB/AHOAhkE3QYJAfEB8wHtAzgDKAG1Aa4ChQXH
     199        AfwBzgIZBN0GCQHxAfMB7QMoIAAD+QG1AZIChQOhAscBpwGtAbUCCQG7Ae4DvAHuAQcEtQT5AzgBtQGS
     200        AoUDoQLHAacBrQG1AgkBuwHuA7wB7gEHBLUEOAMoAbUBkgKFA6ECxwGnAa0BtQIJAbsB7gO8Ae4BBwS1
     201        BCggAAP5Ac8B9wKGAs8CtQIHAu4CBwS1Ac8K+QM4Ac8B9wKGAs8CtQIHAu4CBwS1Ac8KOAMoAc8B9wKG
     202        As8CtQIHAu4CBwS1Ac8KKCAAA/kBzwUHA7UBzxP5AzgBzwUHA7UBzxM4AygBzwUHA7UBzxMoIAAg+SA4
     203        ICggAAFCAU0BPgcAAT4DAAEoAwABgAMAASADAAEBAQABAQYAAQIWAAP//wD/AAMACw==
     204</value>
     205  </data>
    123206</root>
  • trunk/sources/HeuristicLab.Hive.Server.Console/ServiceLocator.cs

    r799 r844  
    2424            new NetTcpBinding(),
    2525            new EndpointAddress("net.tcp://" + Address + ":" + Port + "/HiveServerConsole/ClientManager"));
    26 
     26       
    2727        clientManager = factory.CreateChannel();
    2828      }
Note: See TracChangeset for help on using the changeset viewer.