Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/AddGroup.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/AddGroup.Designer.cs	(revision 1832)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/AddGroup.Designer.cs	(revision 1832)
@@ -0,0 +1,94 @@
+﻿namespace HeuristicLab.Hive.Server.ServerConsole {
+  partial class AddGroup {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.tbName = new System.Windows.Forms.TextBox();
+      this.lblName = new System.Windows.Forms.Label();
+      this.btnClose = new System.Windows.Forms.Button();
+      this.btnAdd = new System.Windows.Forms.Button();
+      this.SuspendLayout();
+      // 
+      // tbName
+      // 
+      this.tbName.Location = new System.Drawing.Point(45, 6);
+      this.tbName.Name = "tbName";
+      this.tbName.Size = new System.Drawing.Size(276, 20);
+      this.tbName.TabIndex = 7;
+      this.tbName.TextChanged += new System.EventHandler(this.tbName_TextChanged);
+      // 
+      // lblName
+      // 
+      this.lblName.AutoSize = true;
+      this.lblName.Location = new System.Drawing.Point(4, 9);
+      this.lblName.Name = "lblName";
+      this.lblName.Size = new System.Drawing.Size(35, 13);
+      this.lblName.TabIndex = 10;
+      this.lblName.Text = "Name";
+      // 
+      // btnClose
+      // 
+      this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+      this.btnClose.Location = new System.Drawing.Point(246, 36);
+      this.btnClose.Name = "btnClose";
+      this.btnClose.Size = new System.Drawing.Size(75, 23);
+      this.btnClose.TabIndex = 9;
+      this.btnClose.Text = "Close";
+      this.btnClose.UseVisualStyleBackColor = true;
+      this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
+      // 
+      // btnAdd
+      // 
+      this.btnAdd.Enabled = false;
+      this.btnAdd.Location = new System.Drawing.Point(7, 36);
+      this.btnAdd.Name = "btnAdd";
+      this.btnAdd.Size = new System.Drawing.Size(75, 23);
+      this.btnAdd.TabIndex = 8;
+      this.btnAdd.Text = "Add";
+      this.btnAdd.UseVisualStyleBackColor = true;
+      this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+      // 
+      // AddGroup
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(337, 70);
+      this.Controls.Add(this.tbName);
+      this.Controls.Add(this.lblName);
+      this.Controls.Add(this.btnClose);
+      this.Controls.Add(this.btnAdd);
+      this.Name = "AddGroup";
+      this.Text = "AddGroup";
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.TextBox tbName;
+    private System.Windows.Forms.Label lblName;
+    private System.Windows.Forms.Button btnClose;
+    private System.Windows.Forms.Button btnAdd;
+  }
+}
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/AddGroup.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/AddGroup.cs	(revision 1832)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/AddGroup.cs	(revision 1832)
@@ -0,0 +1,41 @@
+﻿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace HeuristicLab.Hive.Server.ServerConsole {
+
+  public delegate void AddGroupDelegate(string name);
+
+  public partial class AddGroup : Form {
+
+    public event AddGroupDelegate addGroupEvent;
+
+    public AddGroup() {
+      InitializeComponent();
+    }
+
+    private void btnAdd_Click(object sender, EventArgs e) {
+      if (addGroupEvent != null) {
+        addGroupEvent(tbName.Text);
+      }
+      this.Close();
+    }
+
+    private void btnClose_Click(object sender, EventArgs e) {
+      this.Close();
+    }
+
+    private void tbName_TextChanged(object sender, EventArgs e) {
+      if (string.IsNullOrEmpty(tbName.Text)) {
+        btnAdd.Enabled = false;
+      } else {
+        btnAdd.Enabled = true;
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/AddGroup.resx
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/AddGroup.resx	(revision 1832)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/AddGroup.resx	(revision 1832)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HeuristicLab.Hive.Server.Console-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HeuristicLab.Hive.Server.Console-3.2.csproj	(revision 1774)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HeuristicLab.Hive.Server.Console-3.2.csproj	(revision 1832)
@@ -89,4 +89,10 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="AddGroup.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="AddGroup.Designer.cs">
+      <DependentUpon>AddGroup.cs</DependentUpon>
+    </Compile>
     <Compile Include="AddJobForm.cs">
       <SubType>Form</SubType>
@@ -111,4 +117,7 @@
     <Compile Include="HiveServerConsolePlugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="AddGroup.resx">
+      <DependentUpon>AddGroup.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="AddJobForm.resx">
       <DependentUpon>AddJobForm.cs</DependentUpon>
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.cs	(revision 1774)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.cs	(revision 1832)
@@ -44,6 +44,6 @@
       tbIp.Text = "10.20.53.1";
       tbPort.Text = WcfSettings.GetDefaultPort().ToString();
-      tbUserName.Text = "a";
-      tbPwd.Text = "a";
+      tbUserName.Text = "test45";
+      tbPwd.Text = "test";
     }
 
@@ -62,13 +62,15 @@
       newIp = newIp.Replace(" ", "");
 
-        ServiceLocator.Address = newIp;
-        ServiceLocator.Port = this.tbPort.Text;
+      ServiceLocator.Address = newIp;
+      ServiceLocator.Port = this.tbPort.Text;
 
-        if (IsValid()) {
-          this.Visible = false;
-          information = new HiveServerManagementConsole();
-          information.closeFormEvent += new closeForm(EnableForm);
-          information.Show();
-        }
+      if (IsValid()) {
+        this.Visible = false;
+        information = new HiveServerManagementConsole();
+        information.closeFormEvent += new closeForm(EnableForm);
+        information.Show();
+      } else {
+        lblError.Text = "Problem with login";
+      }
     }
 
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.Designer.cs	(revision 1774)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.Designer.cs	(revision 1832)
@@ -87,4 +87,7 @@
       this.btnRefresh = new System.Windows.Forms.Button();
       this.tvClientControl = new System.Windows.Forms.TreeView();
+      this.contextMenuGroup = new System.Windows.Forms.ContextMenuStrip(this.components);
+      this.menuItemAddGroup = new System.Windows.Forms.ToolStripMenuItem();
+      this.menuItemDeleteGroup = new System.Windows.Forms.ToolStripMenuItem();
       this.lvClientControl = new System.Windows.Forms.ListView();
       this.tcManagementConsole = new System.Windows.Forms.TabControl();
@@ -110,4 +113,5 @@
       this.splitContainer1.Panel2.SuspendLayout();
       this.splitContainer1.SuspendLayout();
+      this.contextMenuGroup.SuspendLayout();
       this.tcManagementConsole.SuspendLayout();
       this.SuspendLayout();
@@ -354,7 +358,7 @@
       this.lvJobDetails.FullRowSelect = true;
       this.lvJobDetails.GridLines = true;
-      this.lvJobDetails.Location = new System.Drawing.Point(20, 129);
+      this.lvJobDetails.Location = new System.Drawing.Point(17, 129);
       this.lvJobDetails.Name = "lvJobDetails";
-      this.lvJobDetails.Size = new System.Drawing.Size(375, 137);
+      this.lvJobDetails.Size = new System.Drawing.Size(382, 175);
       this.lvJobDetails.TabIndex = 17;
       this.lvJobDetails.UseCompatibleStateImageBehavior = false;
@@ -369,5 +373,5 @@
       // 
       this.chDetails.Text = "Details";
-      this.chDetails.Width = 247;
+      this.chDetails.Width = 255;
       // 
       // lvSnapshots
@@ -380,7 +384,7 @@
       this.lvSnapshots.FullRowSelect = true;
       this.lvSnapshots.GridLines = true;
-      this.lvSnapshots.Location = new System.Drawing.Point(17, 269);
+      this.lvSnapshots.Location = new System.Drawing.Point(17, 310);
       this.lvSnapshots.Name = "lvSnapshots";
-      this.lvSnapshots.Size = new System.Drawing.Size(382, 102);
+      this.lvSnapshots.Size = new System.Drawing.Size(382, 69);
       this.lvSnapshots.TabIndex = 16;
       this.lvSnapshots.UseCompatibleStateImageBehavior = false;
@@ -390,10 +394,10 @@
       // 
       this.chClientCalculated.Text = "Client Calculated";
-      this.chClientCalculated.Width = 88;
+      this.chClientCalculated.Width = 112;
       // 
       // chProgress
       // 
       this.chProgress.Text = "Progress";
-      this.chProgress.Width = 67;
+      this.chProgress.Width = 100;
       // 
       // chSnapshotTime
@@ -686,4 +690,6 @@
       // tvClientControl
       // 
+      this.tvClientControl.AllowDrop = true;
+      this.tvClientControl.ContextMenuStrip = this.contextMenuGroup;
       this.tvClientControl.Dock = System.Windows.Forms.DockStyle.Top;
       this.tvClientControl.Location = new System.Drawing.Point(0, 0);
@@ -691,5 +697,26 @@
       this.tvClientControl.Size = new System.Drawing.Size(151, 357);
       this.tvClientControl.TabIndex = 0;
+      this.tvClientControl.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tvClientControl_MouseUp);
       this.tvClientControl.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvClientControl_NodeMouseClick);
+      // 
+      // contextMenuGroup
+      // 
+      this.contextMenuGroup.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.menuItemAddGroup,
+            this.menuItemDeleteGroup});
+      this.contextMenuGroup.Name = "contextMenuJob";
+      this.contextMenuGroup.Size = new System.Drawing.Size(149, 48);
+      // 
+      // menuItemAddGroup
+      // 
+      this.menuItemAddGroup.Name = "menuItemAddGroup";
+      this.menuItemAddGroup.Size = new System.Drawing.Size(148, 22);
+      this.menuItemAddGroup.Text = "Add Group";
+      // 
+      // menuItemDeleteGroup
+      // 
+      this.menuItemDeleteGroup.Name = "menuItemDeleteGroup";
+      this.menuItemDeleteGroup.Size = new System.Drawing.Size(148, 22);
+      this.menuItemDeleteGroup.Text = "Delete Group";
       // 
       // lvClientControl
@@ -764,4 +791,5 @@
       this.splitContainer1.Panel2.ResumeLayout(false);
       this.splitContainer1.ResumeLayout(false);
+      this.contextMenuGroup.ResumeLayout(false);
       this.tcManagementConsole.ResumeLayout(false);
       this.ResumeLayout(false);
@@ -836,4 +864,7 @@
     private System.Windows.Forms.Button btnRefresh;
     private System.Windows.Forms.TreeView tvClientControl;
+    private System.Windows.Forms.ContextMenuStrip contextMenuGroup;
+    private System.Windows.Forms.ToolStripMenuItem menuItemAddGroup;
+    private System.Windows.Forms.ToolStripMenuItem menuItemDeleteGroup;
   }
 }
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs	(revision 1774)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs	(revision 1832)
@@ -58,5 +58,5 @@
     private Job currentJob = null;
     private ClientInfo currentClient = null;
-    
+
     TreeNode currentNode = null;
 
@@ -132,4 +132,41 @@
       };
 
+      //adding group
+      menuItemAddGroup.Click += (s, e) => {
+        AddGroup addgroup = new AddGroup();
+        parentgroup = Guid.Empty;
+        if ((tvClientControl.SelectedNode != null) && (((ClientGroup)tvClientControl.SelectedNode.Tag).Id != Guid.Empty)) {
+          parentgroup = ((ClientGroup)tvClientControl.SelectedNode.Tag).Id;
+        }
+        addgroup.addGroupEvent += new AddGroupDelegate(addgroup_addGroupEvent);
+        addgroup.Show();
+      };
+
+      //adding group
+      menuItemDeleteGroup.Click += (s, e) => {
+        IClientManager clientManager = ServiceLocator.GetClientManager();
+        if (tvClientControl.SelectedNode != null) {
+          //  Delete Group
+        }
+      };
+    }
+
+    Guid parentgroup = Guid.Empty;
+
+    void addgroup_addGroupEvent(string name) {
+      IClientManager clientManager = ServiceLocator.GetClientManager();
+
+      if (parentgroup != Guid.Empty) {
+        ClientGroup cg = new ClientGroup() { Name = name };
+        ResponseObject<ClientGroup> respcg = clientManager.AddClientGroup(cg);
+        Response res = clientManager.AddResourceToGroup(parentgroup, respcg.Obj);
+        if (res != null && !res.Success) {
+          MessageBox.Show(res.StatusMessage, "Error adding Group", MessageBoxButtons.OK, MessageBoxIcon.Error);
+        }
+      } else {
+        ClientGroup cg = new ClientGroup() { Name = name };
+        clientManager.AddClientGroup(cg);
+      }
+
     }
 
@@ -150,94 +187,4 @@
     }
 
-    ///// <summary>
-    ///// Adds clients to ListView and TreeView
-    ///// </summary>
-    //private void AddClients() {
-    //  try {
-    //    clientObjects = new Dictionary<Guid, ListViewGroup>();
-    //    clientInfoObjects = new Dictionary<Guid, ListViewItem>();
-
-    //    clients = ClientManager.GetAllClientGroups();
-
-    //    List<Guid> inGroup = new List<Guid>();
-    //    foreach (ClientGroup cg in clients.List) {
-    //      TreeNode tn = new TreeNode(cg.Name);
-    //      tn.Tag = cg;
-    //      tvClientControl.Nodes.Add(tn);
-
-    //      ListViewGroup lvg = new ListViewGroup(cg.Name, HorizontalAlignment.Left);
-
-    //      foreach (ClientInfo ci in cg.Resources) {
-    //        ListViewItem item = null;
-    //        if ((ci.State == State.offline) || (ci.State == State.nullState)) {
-    //          item = new ListViewItem(ci.Name, 3, lvg);
-    //        } else {
-    //          int percentageUsage = CapacityRam(ci.NrOfCores, ci.NrOfFreeCores);
-    //          int usage = 0;
-    //          if ((percentageUsage >= 0) && (percentageUsage <= 25)) {
-    //            usage = 0;
-    //          } else if ((percentageUsage > 25) && (percentageUsage <= 75)) {
-    //            usage = 1;
-    //          } else if ((percentageUsage > 75) && (percentageUsage <= 100)) {
-    //            usage = 2;
-    //          }
-
-    //          item = new ListViewItem(ci.Name, usage, lvg);
-    //        }
-    //        item.Tag = ci.Id;
-    //        lvClientControl.Items.Add(item);
-    //        clientInfoObjects.Add(ci.Id, item);
-    //        inGroup.Add(ci.Id);
-
-    //      }
-    //      lvClientControl.BeginUpdate();
-    //      lvClientControl.Groups.Add(lvg);
-    //      lvClientControl.EndUpdate();
-    //      clientObjects.Add(cg.Id, lvg);
-    //    } // Groups
-
-    //    clientInfo = ClientManager.GetAllClients();
-    //    ListViewGroup lvunsorted = new ListViewGroup("no group", HorizontalAlignment.Left);
-    //    foreach (ClientInfo ci in clientInfo.List) {
-    //      bool help = false;
-    //      foreach (Guid client in inGroup) {
-    //        if (client == ci.Id) {
-    //          help = true;
-    //          break;
-    //        }
-    //      }
-    //      if (!help) {
-    //        ListViewItem item = null;
-    //        if ((ci.State == State.offline) || (ci.State == State.nullState)) {
-    //          item = new ListViewItem(ci.Name, 3, lvunsorted);
-    //        } else {
-    //          int percentageUsage = CapacityRam(ci.NrOfCores, ci.NrOfFreeCores);
-    //          int usage = 0;
-    //          if ((percentageUsage >= 0) && (percentageUsage <= 25)) {
-    //            usage = 0;
-    //          } else if ((percentageUsage > 25) && (percentageUsage <= 75)) {
-    //            usage = 1;
-    //          } else if ((percentageUsage > 75) && (percentageUsage <= 100)) {
-    //            usage = 2;
-    //          }
-    //          item = new ListViewItem(ci.Name, usage, lvunsorted);
-    //        }
-    //        item.Tag = ci.Id;
-    //        lvClientControl.Items.Add(item);
-    //      }
-    //    }
-    //    lvClientControl.BeginUpdate();
-    //    lvClientControl.Groups.Add(lvunsorted);
-    //    lvClientControl.EndUpdate();
-    //    if (flagClient) {
-    //      ClientClicked();
-    //    }
-    //  }
-    //  catch (Exception ex) {
-    //    closeFormEvent(true, true);
-    //    this.Close();
-    //  }
-    //}
-
     private void AddClients() {
       clientList.Clear();
@@ -256,5 +203,4 @@
       }
       tvClientControl.ExpandAll();
-      Thread.Sleep(5000);
     }
 
@@ -343,5 +289,5 @@
             lvi.ToolTipText = (job.Percentage * 100) + "% of job calculated";
           } else if (job.State == State.finished) {
-            ListViewItem lvi = new ListViewItem(job.Id.ToString(),0, lvJobFinished);
+            ListViewItem lvi = new ListViewItem(job.Id.ToString(), 0, lvJobFinished);
             lvi.Tag = job;
             jobObjects.Add(job.Id, lvi);
@@ -385,20 +331,20 @@
         currentClient = (ClientInfo)lvClientControl.SelectedItems[0].Tag;
       }
-      if(currentClient != null) {
-      int percentageUsage = CapacityRam(currentClient.NrOfCores, currentClient.NrOfFreeCores);
-      int usage = 3;
-      if ((currentClient.State != State.offline) && (currentClient.State != State.nullState)) {
-        if ((percentageUsage >= 0) && (percentageUsage <= 25)) {
-          usage = 0;
-        } else if ((percentageUsage > 25) && (percentageUsage <= 75)) {
-          usage = 1;
-        } else if ((percentageUsage > 75) && (percentageUsage <= 100)) {
-          usage = 2;
-        }
-      }
-      pbClientControl.Image = ilLargeImgClient.Images[usage];
-      lblClientName.Text = currentClient.Name;
-      lblLogin.Text = currentClient.Login.ToString();
-      lblState.Text = currentClient.State.ToString();
+      if (currentClient != null) {
+        int percentageUsage = CapacityRam(currentClient.NrOfCores, currentClient.NrOfFreeCores);
+        int usage = 3;
+        if ((currentClient.State != State.offline) && (currentClient.State != State.nullState)) {
+          if ((percentageUsage >= 0) && (percentageUsage <= 25)) {
+            usage = 0;
+          } else if ((percentageUsage > 25) && (percentageUsage <= 75)) {
+            usage = 1;
+          } else if ((percentageUsage > 75) && (percentageUsage <= 100)) {
+            usage = 2;
+          }
+        }
+        pbClientControl.Image = ilLargeImgClient.Images[usage];
+        lblClientName.Text = currentClient.Name;
+        lblLogin.Text = currentClient.Login.ToString();
+        lblState.Text = currentClient.State.ToString();
       }
     }
@@ -437,9 +383,9 @@
       lvJobDetails.Items.Add(lvi);
 
-        lvi = null;
-        lvi = new ListViewItem();
-        lvi.Text = "created at:";
-        lvi.SubItems.Add(currentJob.DateCreated.ToString());
-        lvJobDetails.Items.Add(lvi);
+      lvi = null;
+      lvi = new ListViewItem();
+      lvi.Text = "created at:";
+      lvi.SubItems.Add(currentJob.DateCreated.ToString());
+      lvJobDetails.Items.Add(lvi);
 
       if (currentJob.ParentJob != null) {
@@ -449,5 +395,5 @@
         lvi.SubItems.Add(currentJob.ParentJob.ToString());
         lvJobDetails.Items.Add(lvi);
-     // lblParentJob.Text = currentJob.ParentJob.Id + " is parent job";
+        // lblParentJob.Text = currentJob.ParentJob.Id + " is parent job";
       }// else {
       //  lblParentJob.Text = "";
@@ -460,5 +406,5 @@
       lvJobDetails.Items.Add(lvi);
 
-     // lblPriorityJob.Text = "Priority of job is " + currentJob.Priority;
+      // lblPriorityJob.Text = "Priority of job is " + currentJob.Priority;
       if (currentJob.Client != null) {
         lvi = null;
@@ -482,5 +428,5 @@
             ServiceLocator.GetJobManager();
           ResponseObject<JobResult> jobRes = jobManager.GetLastJobResultOf(currentJob.Id, false);
-          
+
           lvi = null;
           lvi = new ListViewItem();
@@ -488,16 +434,16 @@
           lvi.SubItems.Add(jobRes.Obj.DateFinished.ToString());
           lvJobDetails.Items.Add(lvi);
-         // lblJobCalculationEnd.Text = "Calculation ended at " + jobRes.Obj.DateFinished;
+          // lblJobCalculationEnd.Text = "Calculation ended at " + jobRes.Obj.DateFinished;
         }
       } else {
-       // lblClientCalculating.Text = "";
-       // lblJobCalculationBegin.Text = "";
-       // lblJobCalculationEnd.Text = "";
+        // lblClientCalculating.Text = "";
+        // lblJobCalculationBegin.Text = "";
+        // lblJobCalculationEnd.Text = "";
       }
       if (currentJob.State != State.offline) {
         lvSnapshots.Items.Clear();
-        if (currentJob.State == State.finished)
-          GetSnapshotList();
-        lvSnapshots.Visible = true;
+        //if (currentJob.State == State.finished)
+        GetSnapshotList();
+        //lvSnapshots.Visible = true;
       } else {
         lvSnapshots.Visible = false;
@@ -686,5 +632,5 @@
       //ResponseList<ClientGroup> clientsOld = clients;
 
-     // newClients = ClientManager.GetAllClientGroups();
+      // newClients = ClientManager.GetAllClientGroups();
 
       //IDictionary<Guid, ClientGroup> clientsOldHelp;
@@ -795,9 +741,6 @@
 
     private void DetermineDelta() {
-      
-
-
-    }
-
+
+    }
 
     //private void GetDelta(IList<ClientGroup> oldClient, IDictionary<Guid, ClientGroup> helpClients) {
@@ -896,13 +839,22 @@
       IJobManager jobManager = ServiceLocator.GetJobManager();
 
-      ResponseObject<JobResult> jobRes = jobManager.GetLastJobResultOf(currentJob.Id, false);
-
-      // iterate threw all snapshots if method is implemented
-
-      ListViewItem curSnapshot = new ListViewItem(jobRes.Obj.Client.Name);
-      double percentage = jobRes.Obj.Percentage * 100;
-      curSnapshot.SubItems.Add(percentage.ToString() + " %");
-      curSnapshot.SubItems.Add(jobRes.Obj.Timestamp.ToString());
-      lvSnapshots.Items.Add(curSnapshot);
+      ResponseList<JobResult> jobRes = jobManager.GetAllJobResults(currentJob.Id);
+
+      if (jobRes.List != null) {
+        foreach (JobResult jobresult in jobRes.List) {
+          ListViewItem curSnapshot = new ListViewItem(jobresult.Client.Name);
+          double percentage = jobresult.Percentage * 100;
+          curSnapshot.SubItems.Add(percentage.ToString() + " %");
+          curSnapshot.SubItems.Add(jobresult.Timestamp.ToString());
+          lvSnapshots.Items.Add(curSnapshot);
+        }
+      }
+
+      if ((jobRes.List == null) && (jobRes.List.Count == 0)) {
+        lvSnapshots.Visible = false;
+      } else {
+        lvSnapshots.Visible = true;
+      }
+
     }
 
@@ -959,10 +911,4 @@
     private void Refresh_Click(object sender, EventArgs e) {
       Form overlayingForm = new Form();
-      //Label loadingLabel = new Label();
-      //loadingLabel.Text = "Loading";
-      //loadingLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-      //loadingLabel.Location = new Point(this.Width / 2, this.Height / 2);
-      //overlayingForm.Controls.Add(loadingLabel);
-
 
       overlayingForm.Show();
@@ -971,17 +917,39 @@
       overlayingForm.Opacity = 0.4;
       overlayingForm.Size = this.Size;
-      //overlayingForm.PointToClient(new Point(this.Left, this.Top));
       overlayingForm.Location = this.Location;
-      Console.WriteLine(this.Left + ", " + this.Top);
-      //overlayingForm.Left = this.Left;
-      //overlayingForm.Top = this.Top;
-
-      
-      
-
+
+      //Label lbl = new Label();
+      //overlayingForm.Controls.Add(lbl);
+      //lbl.AutoSize = true;
+      //lbl.Text = "Loading";
+      //lbl.Name = "lblName";
+      //lbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+      //lbl.ForeColor = Color.Black;
+      //lbl.BackColor = Color.Transparent;
+      //lbl.Location = new Point(overlayingForm.Width / 2, overlayingForm.Height / 2);
 
       AddClients();
 
       overlayingForm.Close();
+    }
+
+    private void tvClientControl_MouseUp(object sender, MouseEventArgs e) {
+      // If the right mouse button was clicked and released,
+      // display the shortcut menu assigned to the ListView. 
+      contextMenuGroup.Items.Clear();
+      TreeViewHitTestInfo hitTestInfo = tvClientControl.HitTest(e.Location);
+      tvClientControl.SelectedNode = hitTestInfo.Node;
+      if (e.Button != MouseButtons.Right) return;
+        if (hitTestInfo.Node != null) {
+          Resource selectedGroup = (Resource)tvClientControl.SelectedNode.Tag;
+
+          if (selectedGroup != null) {
+            contextMenuGroup.Items.Add(menuItemAddGroup);
+            contextMenuGroup.Items.Add(menuItemDeleteGroup);
+          }
+        } else {
+          contextMenuGroup.Items.Add(menuItemAddGroup);
+        }
+        tvClientControl.ContextMenuStrip.Show(new Point(e.X, e.Y));
     }
   }
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.resx
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.resx	(revision 1774)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.resx	(revision 1832)
@@ -331,6 +331,9 @@
 </value>
   </data>
+  <metadata name="contextMenuGroup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>504, 38</value>
+  </metadata>
   <metadata name="contextMenuJob.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>252, 44</value>
+    <value>246, 40</value>
   </metadata>
   <metadata name="ilSmallImgJob.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
