Index: /trunk/sources/HeuristicLab.Hive.Server.Console/AddJobForm.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Console/AddJobForm.Designer.cs	(revision 1029)
+++ /trunk/sources/HeuristicLab.Hive.Server.Console/AddJobForm.Designer.cs	(revision 1030)
@@ -1,3 +1,24 @@
-﻿namespace HeuristicLab.Hive.Server.Console {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Hive.Server.Console {
   partial class AddJobForm {
     /// <summary>
@@ -28,4 +49,7 @@
       this.btnAdd = new System.Windows.Forms.Button();
       this.btnClose = new System.Windows.Forms.Button();
+      this.lblNumJobs = new System.Windows.Forms.Label();
+      this.tbNumJobs = new System.Windows.Forms.TextBox();
+      this.lblError = new System.Windows.Forms.Label();
       this.SuspendLayout();
       // 
@@ -33,5 +57,5 @@
       // 
       this.lblParentJob.AutoSize = true;
-      this.lblParentJob.Location = new System.Drawing.Point(12, 9);
+      this.lblParentJob.Location = new System.Drawing.Point(9, 36);
       this.lblParentJob.Name = "lblParentJob";
       this.lblParentJob.Size = new System.Drawing.Size(58, 13);
@@ -42,5 +66,5 @@
       // 
       this.cbParJob.FormattingEnabled = true;
-      this.cbParJob.Location = new System.Drawing.Point(120, 6);
+      this.cbParJob.Location = new System.Drawing.Point(117, 33);
       this.cbParJob.Name = "cbParJob";
       this.cbParJob.Size = new System.Drawing.Size(212, 21);
@@ -49,5 +73,5 @@
       // btnAdd
       // 
-      this.btnAdd.Location = new System.Drawing.Point(15, 38);
+      this.btnAdd.Location = new System.Drawing.Point(12, 65);
       this.btnAdd.Name = "btnAdd";
       this.btnAdd.Size = new System.Drawing.Size(75, 23);
@@ -59,5 +83,5 @@
       // btnClose
       // 
-      this.btnClose.Location = new System.Drawing.Point(257, 38);
+      this.btnClose.Location = new System.Drawing.Point(254, 65);
       this.btnClose.Name = "btnClose";
       this.btnClose.Size = new System.Drawing.Size(75, 23);
@@ -67,9 +91,37 @@
       this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
       // 
+      // lblNumJobs
+      // 
+      this.lblNumJobs.AutoSize = true;
+      this.lblNumJobs.Location = new System.Drawing.Point(12, 9);
+      this.lblNumJobs.Name = "lblNumJobs";
+      this.lblNumJobs.Size = new System.Drawing.Size(78, 13);
+      this.lblNumJobs.TabIndex = 6;
+      this.lblNumJobs.Text = "Number of jobs";
+      // 
+      // tbNumJobs
+      // 
+      this.tbNumJobs.Location = new System.Drawing.Point(117, 6);
+      this.tbNumJobs.Name = "tbNumJobs";
+      this.tbNumJobs.Size = new System.Drawing.Size(212, 20);
+      this.tbNumJobs.TabIndex = 7;
+      this.tbNumJobs.Text = "1";
+      // 
+      // lblError
+      // 
+      this.lblError.AutoSize = true;
+      this.lblError.Location = new System.Drawing.Point(94, 74);
+      this.lblError.Name = "lblError";
+      this.lblError.Size = new System.Drawing.Size(0, 13);
+      this.lblError.TabIndex = 8;
+      // 
       // AddJobForm
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.ClientSize = new System.Drawing.Size(344, 68);
+      this.ClientSize = new System.Drawing.Size(344, 100);
+      this.Controls.Add(this.lblError);
+      this.Controls.Add(this.tbNumJobs);
+      this.Controls.Add(this.lblNumJobs);
       this.Controls.Add(this.btnClose);
       this.Controls.Add(this.btnAdd);
@@ -89,4 +141,7 @@
     private System.Windows.Forms.Button btnAdd;
     private System.Windows.Forms.Button btnClose;
+    private System.Windows.Forms.Label lblNumJobs;
+    private System.Windows.Forms.TextBox tbNumJobs;
+    private System.Windows.Forms.Label lblError;
   }
 }
Index: /trunk/sources/HeuristicLab.Hive.Server.Console/AddJobForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Console/AddJobForm.cs	(revision 1029)
+++ /trunk/sources/HeuristicLab.Hive.Server.Console/AddJobForm.cs	(revision 1030)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -35,14 +56,29 @@
 
     private void btnAdd_Click(object sender, EventArgs e) {
-      if (cbParJob.SelectedIndex != 0) {
-        foreach (Job pjob in jobGroups.List) {
-          if (cbParJob.SelectedItem.ToString().Equals(pjob.Id.ToString())) {
-            Job job = new Job { ParentJob = pjob };
-            Response resp = jobManager.AddNewJob(job);
+      try {
+        lblError.Text = "";
+        int numJobs = Convert.ToInt32(tbNumJobs.Text);
+        if (numJobs > 0) {
+          for (int i = 0; i < numJobs; i++) {
+            if (cbParJob.SelectedIndex != 0) {
+              foreach (Job pjob in jobGroups.List) {
+                if (cbParJob.SelectedItem.ToString().Equals(pjob.Id.ToString())) {
+                  Job job = new Job { ParentJob = pjob, State = State.offline };
+                  Response resp = jobManager.AddNewJob(job);
+                }
+              }
+            } else {
+              Job job = new Job { State = State.offline };
+              Response resp = jobManager.AddNewJob(job);
+            }
           }
+          this.Close();
+        } else {
+          lblError.Text = "Wrong number of Jobs";
         }
-      } else {
-        Job job = new Job();
-        Response resp = jobManager.AddNewJob(job);
+
+      }
+      catch {
+        lblError.Text = "There should be a number";
       }
     }
Index: /trunk/sources/HeuristicLab.Hive.Server.Console/AddUserForm.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Console/AddUserForm.Designer.cs	(revision 1029)
+++ /trunk/sources/HeuristicLab.Hive.Server.Console/AddUserForm.Designer.cs	(revision 1030)
@@ -1,3 +1,24 @@
-﻿namespace HeuristicLab.Hive.Server.Console {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Hive.Server.Console {
   partial class AddUserForm {
     /// <summary>
Index: /trunk/sources/HeuristicLab.Hive.Server.Console/AddUserForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Console/AddUserForm.cs	(revision 1029)
+++ /trunk/sources/HeuristicLab.Hive.Server.Console/AddUserForm.cs	(revision 1030)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -77,4 +98,5 @@
         }
       }
+      this.Close();
     }
 
Index: /trunk/sources/HeuristicLab.Hive.Server.Console/HeuristicLab.Hive.Server.Console.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Console/HeuristicLab.Hive.Server.Console.csproj	(revision 1029)
+++ /trunk/sources/HeuristicLab.Hive.Server.Console/HeuristicLab.Hive.Server.Console.csproj	(revision 1030)
@@ -99,6 +99,4 @@
     </Compile>
     <Compile Include="HiveServerConsolePlugin.cs" />
-    <Compile Include="IPAdressTextBox.cs">
-    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <EmbeddedResource Include="AddUserForm.resx">
Index: /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerConsole.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerConsole.cs	(revision 1029)
+++ /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerConsole.cs	(revision 1030)
@@ -62,13 +62,13 @@
       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();
+        }
     }
 
@@ -111,7 +111,10 @@
     }
 
-    private void enableForm(bool cf) {
+    private void enableForm(bool cf, bool error) {
       if (cf) {
         this.Visible = true;
+        if (error == true) {
+          lblError.Text = "Something went wrong with the server";
+        }
       }
     }
Index: /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.Designer.cs	(revision 1029)
+++ /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.Designer.cs	(revision 1030)
@@ -25,5 +25,5 @@
     private void InitializeComponent() {
       this.components = new System.ComponentModel.Container();
-      System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem(new string[] {
+      System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
             "",
             "Test"}, -1);
@@ -47,4 +47,5 @@
       this.tvJobControl = new System.Windows.Forms.TreeView();
       this.lvJobControl = new System.Windows.Forms.ListView();
+      this.imageList3 = new System.Windows.Forms.ImageList(this.components);
       this.tpUserControl = new System.Windows.Forms.TabPage();
       this.scUserControl = new System.Windows.Forms.SplitContainer();
@@ -56,5 +57,4 @@
       this.directorySearcher1 = new System.DirectoryServices.DirectorySearcher();
       this.timerSyncronize = new System.Windows.Forms.Timer(this.components);
-      this.imageList3 = new System.Windows.Forms.ImageList(this.components);
       this.menuStrip1.SuspendLayout();
       this.tcManagementConsole.SuspendLayout();
@@ -111,5 +111,5 @@
       // 
       this.jobToolStripMenuItem.Name = "jobToolStripMenuItem";
-      this.jobToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+      this.jobToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
       this.jobToolStripMenuItem.Text = "Job";
       this.jobToolStripMenuItem.Click += new System.EventHandler(this.jobToolStripMenuItem1_Click);
@@ -189,8 +189,9 @@
       // lvClientControl
       // 
+      this.lvClientControl.AllowDrop = true;
       this.lvClientControl.Dock = System.Windows.Forms.DockStyle.Fill;
       this.lvClientControl.ImeMode = System.Windows.Forms.ImeMode.Off;
       this.lvClientControl.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
-            listViewItem2});
+            listViewItem1});
       this.lvClientControl.LargeImageList = this.imageList1;
       this.lvClientControl.Location = new System.Drawing.Point(0, 0);
@@ -246,4 +247,5 @@
       // lvJobControl
       // 
+      this.lvJobControl.AllowDrop = true;
       this.lvJobControl.Dock = System.Windows.Forms.DockStyle.Fill;
       this.lvJobControl.LargeImageList = this.imageList3;
@@ -253,4 +255,10 @@
       this.lvJobControl.TabIndex = 0;
       this.lvJobControl.UseCompatibleStateImageBehavior = false;
+      // 
+      // imageList3
+      // 
+      this.imageList3.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList3.ImageStream")));
+      this.imageList3.TransparentColor = System.Drawing.Color.Transparent;
+      this.imageList3.Images.SetKeyName(0, "PlayHS.bmp");
       // 
       // tpUserControl
@@ -292,4 +300,5 @@
       // lvUserControl
       // 
+      this.lvUserControl.AllowDrop = true;
       this.lvUserControl.Dock = System.Windows.Forms.DockStyle.Fill;
       this.lvUserControl.LargeImageList = this.imageList2;
@@ -333,10 +342,4 @@
       // 
       this.timerSyncronize.Interval = 10000;
-      // 
-      // imageList3
-      // 
-      this.imageList3.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList3.ImageStream")));
-      this.imageList3.TransparentColor = System.Drawing.Color.Transparent;
-      this.imageList3.Images.SetKeyName(0, "PlayHS.bmp");
       // 
       // HiveServerManagementConsole
Index: /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.cs	(revision 1029)
+++ /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.cs	(revision 1030)
@@ -34,5 +34,5 @@
 namespace HeuristicLab.Hive.Server.Console {
 
-  public delegate void closeForm(bool cf);
+  public delegate void closeForm(bool cf, bool error);
 
   public partial class HiveServerManagementConsole : Form {
@@ -63,78 +63,113 @@
 
     private void addClients() {
-      IClientManager clientManager =
-        ServiceLocator.GetClientManager();
-
-      clients = clientManager.GetAllClientGroups();
-
-      lvClientControl.Items.Clear();
-      tvClientControl.Nodes.Clear();
-      int count = 0;
-      foreach (ClientGroup cg in clients.List) {
-        tvClientControl.Nodes.Add(cg.Name);
-        ListViewGroup lvg = new ListViewGroup(cg.Name, HorizontalAlignment.Left);
-        foreach (ClientInfo ci in clientManager.GetAllClients().List) {
-          tvClientControl.Nodes[tvClientControl.Nodes.Count - 1].Nodes.Add(ci.Name);
-          lvClientControl.Items.Add(new ListViewItem(ci.Name, count, lvg));
+      try {
+        IClientManager clientManager =
+          ServiceLocator.GetClientManager();
+
+        clients = clientManager.GetAllClientGroups();
+
+        lvClientControl.Items.Clear();
+        tvClientControl.Nodes.Clear();
+        int count = 0;
+        foreach (ClientGroup cg in clients.List) {
+          tvClientControl.Nodes.Add(cg.Name);
+          ListViewGroup lvg = new ListViewGroup(cg.Name, HorizontalAlignment.Left);
+          foreach (ClientInfo ci in clientManager.GetAllClients().List) {
+            tvClientControl.Nodes[tvClientControl.Nodes.Count - 1].Nodes.Add(ci.Name);
+            lvClientControl.Items.Add(new ListViewItem(ci.Name, count, lvg));
+            count = (count + 1) % 3;
+          }
+          lvClientControl.Groups.Add(lvg);
+        } // Groups
+
+        clientInfo = clientManager.GetAllClients();
+        ListViewGroup lvunsorted = new ListViewGroup("unsorted", HorizontalAlignment.Left);
+        foreach (ClientInfo ci in clientInfo.List) {
+          tvClientControl.Nodes.Add(ci.Name);
+          lvClientControl.Items.Add(new ListViewItem(ci.Name, count, lvunsorted));
           count = (count + 1) % 3;
         }
-        lvClientControl.Groups.Add(lvg);
-      } // Groups
-
-      clientInfo = clientManager.GetAllClients();
-      ListViewGroup lvunsorted = new ListViewGroup("unsorted", HorizontalAlignment.Left);
-      foreach (ClientInfo ci in clientInfo.List) {
-        tvClientControl.Nodes.Add(ci.Name);
-        lvClientControl.Items.Add(new ListViewItem(ci.Name, count, lvunsorted));
-        count = (count + 1) % 3;
-      }
-      lvClientControl.Groups.Add(lvunsorted);
+        lvClientControl.Groups.Add(lvunsorted);
+      }
+      catch (Exception ex) {
+        closeFormEvent(true, true);
+        this.Close();
+      }
     }
 
     private void addJobs() {
-      IJobManager jobManager =
-        ServiceLocator.GetJobManager();
-      jobs = jobManager.GetAllJobs();
-
-      lvJobControl.Items.Clear();
-      tvJobControl.Nodes.Clear();
-
-      foreach (Job job in jobs.List) {
-        tvJobControl.Nodes.Add(job.Id.ToString());
-        lvJobControl.Items.Add(new ListViewItem(job.Id.ToString(), 0));
-      } // Jobs
-
+      try {
+        IJobManager jobManager =
+          ServiceLocator.GetJobManager();
+        jobs = jobManager.GetAllJobs();
+
+        lvJobControl.Items.Clear();
+        tvJobControl.Nodes.Clear();
+
+        ListViewGroup lvJobFinished = new ListViewGroup("finished", HorizontalAlignment.Left);
+        ListViewGroup lvJobOffline = new ListViewGroup("offline", HorizontalAlignment.Left);
+        ListViewGroup lvJobCalculating = new ListViewGroup("calculating", HorizontalAlignment.Left);
+        tvJobControl.Nodes.Add("finished");
+        tvJobControl.Nodes.Add("offline");
+        tvJobControl.Nodes.Add("calculating");
+        foreach (Job job in jobs.List) {
+          if (job.State == State.finished) {
+            tvJobControl.Nodes[0].Nodes.Add(job.Id.ToString());
+            lvJobControl.Items.Add(new ListViewItem(job.Id.ToString(), 0, lvJobFinished));
+          } else if (job.State == State.offline) {
+            tvJobControl.Nodes[1].Nodes.Add(job.Id.ToString());
+            lvJobControl.Items.Add(new ListViewItem(job.Id.ToString(), 0, lvJobOffline));
+          } else if (job.State == State.calculating) {
+            tvJobControl.Nodes[2].Nodes.Add(job.Id.ToString());
+            lvJobControl.Items.Add(new ListViewItem(job.Id.ToString(), 0, lvJobCalculating));
+          }
+        } // Jobs
+        lvJobControl.Groups.Add(lvJobFinished);
+        lvJobControl.Groups.Add(lvJobOffline);
+        lvJobControl.Groups.Add(lvJobCalculating);
+      }
+      catch (Exception ex) {
+        closeFormEvent(true, true);
+        this.Close();
+      }
     }
 
     private void addUsers() {
-      IUserRoleManager userRoleManager =
-        ServiceLocator.GetUserRoleManager();
-
-      userGroups = userRoleManager.GetAllUserGroups();
-
-      lvUserControl.Items.Clear();
-      tvUserControl.Nodes.Clear();
-
-      foreach (UserGroup ug in userGroups.List) {
-        tvUserControl.Nodes.Add(ug.Name);
-        ListViewGroup lvg = new ListViewGroup(ug.Name, HorizontalAlignment.Left);
-
-        foreach (PermissionOwner permOwner in ug.Members) {
-          if (permOwner is User) {
-            User users = permOwner as User;
-            tvUserControl.Nodes[tvUserControl.Nodes.Count - 1].Nodes.Add(users.Name);
-            lvUserControl.Items.Add(new ListViewItem(users.Name, 0, lvg));
+      try {
+        IUserRoleManager userRoleManager =
+          ServiceLocator.GetUserRoleManager();
+
+        userGroups = userRoleManager.GetAllUserGroups();
+
+        lvUserControl.Items.Clear();
+        tvUserControl.Nodes.Clear();
+
+        foreach (UserGroup ug in userGroups.List) {
+          tvUserControl.Nodes.Add(ug.Name);
+          ListViewGroup lvg = new ListViewGroup(ug.Name, HorizontalAlignment.Left);
+
+          foreach (PermissionOwner permOwner in ug.Members) {
+            if (permOwner is User) {
+              User users = permOwner as User;
+              tvUserControl.Nodes[tvUserControl.Nodes.Count - 1].Nodes.Add(users.Name);
+              lvUserControl.Items.Add(new ListViewItem(users.Name, 0, lvg));
+            }
           }
+          lvUserControl.Groups.Add(lvg);
+
+        } // Users
+        usersList = userRoleManager.GetAllUsers();
+        ListViewGroup lvunsorted = new ListViewGroup("unsorted", HorizontalAlignment.Left);
+        foreach (User u in usersList.List) {
+          tvUserControl.Nodes.Add(u.Name);
+          lvUserControl.Items.Add(new ListViewItem(u.Name, 0, lvunsorted));
         }
-        lvUserControl.Groups.Add(lvg);
-
-      } // Users
-      usersList = userRoleManager.GetAllUsers();
-      ListViewGroup lvunsorted = new ListViewGroup("unsorted", HorizontalAlignment.Left);
-      foreach (User u in usersList.List) {
-        tvUserControl.Nodes.Add(u.Name);
-        lvUserControl.Items.Add(new ListViewItem(u.Name, 0, lvunsorted));
-      }
-      lvUserControl.Groups.Add(lvunsorted);
+        lvUserControl.Groups.Add(lvunsorted);
+      }
+      catch (Exception ex) {
+        closeFormEvent(true, true);
+        this.Close();
+      }
+
     }
 
@@ -146,5 +181,5 @@
     private void close_Click(object sender, EventArgs e) {
       if (closeFormEvent != null) {
-        closeFormEvent(true);
+        closeFormEvent(true, false);
       }
       this.Close();
@@ -158,5 +193,5 @@
     private void HiveServerConsoleInformation_FormClosing(object sender, FormClosingEventArgs e) {
       if (closeFormEvent != null) {
-        closeFormEvent(true);
+        closeFormEvent(true, false);
       }
 
Index: /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.resx
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.resx	(revision 1029)
+++ /trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.resx	(revision 1030)
@@ -119,8 +119,8 @@
   </resheader>
   <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>139, 17</value>
+    <value>32, 12</value>
   </metadata>
   <metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>248, 17</value>
+    <value>129, 12</value>
   </metadata>
   <data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
@@ -216,5 +216,5 @@
   </data>
   <metadata name="imageList3.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 54</value>
+    <value>587, 13</value>
   </metadata>
   <data name="imageList3.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
@@ -223,5 +223,5 @@
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
         ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAG
-        CQAAAk1TRnQBSQFMAwEBAAEFAQABBAEAASABAAEgAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
+        CQAAAk1TRnQBSQFMAwEBAAEEAQABBAEAASABAAEgAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
         AYADAAEgAwABAQEAAQgGAAEQGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
         AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
@@ -265,5 +265,5 @@
   </data>
   <metadata name="imageList2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>353, 17</value>
+    <value>231, 9</value>
   </metadata>
   <data name="imageList2.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
@@ -344,8 +344,8 @@
   </data>
   <metadata name="directorySearcher1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>458, 17</value>
+    <value>333, 11</value>
   </metadata>
   <metadata name="timerSyncronize.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>603, 17</value>
+    <value>464, 11</value>
   </metadata>
 </root>
Index: unk/sources/HeuristicLab.Hive.Server.Console/IPAdressTextBox.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Console/IPAdressTextBox.cs	(revision 1029)
+++ 	(revision )
@@ -1,1098 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-//// copied from http://www.codeproject.com/KB/edit/IPAddressTextBox.aspx
-
-//using System;
-//using System.Collections;
-//using System.ComponentModel;
-//using System.Windows.Forms;
-//using System.Text.RegularExpressions;
-
-//namespace HeuristicLab.Hive.Server.Console {
-//  [
-//  DefaultProperty("Text"),
-//  DefaultEvent("TextChanged"),
-//  ]
-//  /// <summary>
-//  /// IPAddressTextBox
-//  /// Control to enter IP-Addresses manually
-//  /// Supports Binary and Decimal Notation
-//  /// Supports input of CIDR Notation (appending of Bitmask of Subnetmask devided by Slash)
-//  /// Support input of IP-Address in IPv6 format
-//  /// </summary>
-//  public class IPAddressTextBox : System.Windows.Forms.TextBox {
-//    /// <summary>
-//    /// Required designer variable.
-//    /// </summary>
-//    private System.ComponentModel.Container components = null;
-
-//    private IPNotation m_ipNotation = IPNotation.IPv4Decimal;
-//    private IPNotation m_newIPNotation = IPNotation.IPv4Decimal;
-//    private bool m_bOverwrite = true;
-//    private bool m_bPreventLeave = true;
-//    private System.Windows.Forms.ErrorProvider error;
-//    private Regex m_regexValidNumbers = new Regex("[0-9]");
-//    private ArrayList m_arlDelimeter = new ArrayList(new char[] { '.' });
-
-
-//    public enum IPNotation {
-//      IPv4Decimal,			//192.168.000.001
-//      IPv4Binary,				//11000000.10101000.00000000.00000001
-//      IPv4DecimalCIDR,		//192.168.000.001/16
-//      IPv4BinaryCIDR,			//11000000.10101000.00000000.00000001/16
-//    }
-
-//    /// <summary>
-//    /// Constructor
-//    /// </summary>
-//    public IPAddressTextBox()
-//      : base() {
-//      this.InitializeComponent();
-
-//      this.ResetText();
-//    }
-
-//    private void InitializeComponent() {
-//      this.error = new System.Windows.Forms.ErrorProvider();
-//    }
-
-//    /// <summary>
-//    /// Clean up any resources being used.
-//    /// </summary>
-//    protected override void Dispose(bool disposing) {
-//      if (disposing) {
-//        if (components != null)
-//          components.Dispose();
-//      }
-//      base.Dispose(disposing);
-//    }
-
-//    #region Properties
-//    #region Not allowed Properties from BaseClass
-//    /// <summary>
-//    /// Multiline is not allowed
-//    /// </summary>
-//    [
-//    Category("Behavior"),
-//    Description("Multiline is not allowed"),
-//    DefaultValue(false),
-//    Browsable(false)
-//    ]
-//    public override bool Multiline {
-//      get {
-//        return base.Multiline;
-//      }
-//      set {
-//        //base.Multiline = value;
-//        base.Multiline = false;
-//      }
-//    }
-//    [
-//    Category("Behavior"),
-//    Description("AllowDrop is not allowed"),
-//    DefaultValue(false),
-//    Browsable(false)
-//    ]
-//    public override bool AllowDrop {
-//      get {
-//        return base.AllowDrop;
-//      }
-//      set {
-//        //base.AllowDrop = value;
-//        base.AllowDrop = false;
-//      }
-//    }
-//    [
-//    Category("Behavior"),
-//    Description("AcceptsReturn is not allowed"),
-//    DefaultValue(false),
-//    Browsable(false)
-//    ]
-//    public new bool AcceptsReturn {
-//      get {
-//        return base.AcceptsReturn;
-//      }
-//      set {
-//        //base.AcceptsReturn = value;
-//        base.AcceptsReturn = false;
-//      }
-//    }
-//    [
-//    Category("Behavior"),
-//    Description("AcceptsTab is not allowed"),
-//    DefaultValue(false),
-//    Browsable(false)
-//    ]
-//    public new bool AcceptsTab {
-//      get {
-//        return base.AcceptsTab;
-//      }
-//      set {
-//        //base.AcceptTab = value;
-//        base.AcceptsTab = false;
-//      }
-//    }
-//    [
-//    Category("Behavior"),
-//    Description("CharacterCasing is not allowed"),
-//    DefaultValue(CharacterCasing.Normal),
-//    Browsable(false)
-//    ]
-//    public new CharacterCasing CharacterCasing {
-//      get {
-//        return base.CharacterCasing;
-//      }
-//      set {
-//        //base.CharacterCasing = value;
-//        base.CharacterCasing = CharacterCasing.Normal;
-//      }
-//    }
-//    [
-//    Category("Behavior"),
-//    Description("WordWrap is not allowed"),
-//    DefaultValue(true),
-//    Browsable(false)
-//    ]
-//    public new bool WordWrap {
-//      get {
-//        return base.WordWrap;
-//      }
-//      set {
-//        //base.WordWrap = value;
-//        base.WordWrap = true;
-//      }
-//    }
-
-//    /// <summary>
-//    /// Maxlength must not be changed by user
-//    /// </summary>
-//    [
-//    Category("Behavior"),
-//    Description("Specifies maximum length of a String. Change is not allowed"),
-//    DefaultValue(15),
-//    Browsable(false)
-//    ]
-//    public override int MaxLength {
-//      get {
-//        return base.MaxLength;
-//      }
-//      set {
-//        //base.MaxLength = value;
-//        base.MaxLength = this.Text.Length;
-//      }
-//    }
-
-//    #endregion // Not allowed Properties from BaseClass
-
-//    /// <summary>
-//    /// Specifies if IP-Address
-//    /// </summary>
-//    [
-//    Category("Appearance"),
-//    Description("Specifies the IP-Address"),
-//    DefaultValue("   .   .   .   ")
-//    ]
-//    public override string Text {
-//      get {
-//        return base.Text;
-//      }
-//      set {
-//        try {
-//          if (IPAddressTextBox.ValidateIP(value, this.m_newIPNotation, this.m_arlDelimeter))
-//            base.Text = IPAddressTextBox.MakeValidSpaces(value, this.m_newIPNotation, this.m_arlDelimeter);
-//        }
-//        catch {
-
-//        }
-//      }
-//    }
-
-//    /// <summary>
-//    /// Specifies if Numbers should be overwritten
-//    /// </summary>
-//    [
-//    Category("Behavior"),
-//    Description("Specifies if Numbers should be overwritten"),
-//    DefaultValue(true)
-//    ]
-//    public bool OverWriteMode {
-//      get {
-//        return this.m_bOverwrite;
-//      }
-//      set {
-//        if (value != this.m_bOverwrite) {
-//          this.m_bOverwrite = value;
-//          this.OnOverWriteChanged(value);
-//        }
-//      }
-//    }
-
-//    /// <summary>
-//    /// Prevents leaving of Control if there is an input-error
-//    /// </summary>
-//    [
-//    Category("Behavior"),
-//    Description("Prevents leaving of Control if there is an input-error"),
-//    DefaultValue(true)
-//    ]
-//    public bool PreventLeaveAtError {
-//      get {
-//        return this.m_bPreventLeave;
-//      }
-//      set {
-//        if (value != this.m_bPreventLeave) {
-//          this.m_bPreventLeave = value;
-//          this.OnPreventLeaveChanged(value);
-//        }
-//      }
-//    }
-
-//    /// <summary>
-//    /// Specifies if IP-Address Notation (IPv4, IPv6, Binary, Decimal, CIDR
-//    /// </summary>
-//    [
-//    Category("Appearance"),
-//    Description("Specifies if IP-Address Notation (IPv4, IPv6, Binary, Decimal, CIDR"),
-//    DefaultValue(IPNotation.IPv4Decimal)
-//    ]
-//    public IPNotation Notation {
-//      get {
-//        return this.m_ipNotation;
-//      }
-//      set {
-//        if (value != this.m_ipNotation) {
-//          try {
-//            this.m_newIPNotation = value;
-//            this.ChangeNotation(this.m_ipNotation, this.m_newIPNotation);
-//            this.m_ipNotation = this.m_newIPNotation;
-//            this.OnNotationChanged(this.m_newIPNotation);
-//          }
-//          catch (Exception LastError) {
-//            System.Diagnostics.Debug.WriteLine(LastError.Message);
-//            throw LastError;
-//          }
-//        }
-//      }
-//    }
-
-//    /// <summary>
-//    /// Specifies the Errorprovider that appears at invalid IPs
-//    /// </summary>
-//    [
-//    Category("Appearance"),
-//    Description("Specifies the Errorprovider that appears at invalid IPs"),
-//    DefaultValue(false)
-//    ]
-//    public ErrorProvider IPError {
-//      get {
-//        return this.error;
-//      }
-//    }
-
-
-//    #endregion //Properties
-
-//    #region Eventhandling
-
-//    /// <summary>
-//    /// Delegate for Notation-Events
-//    /// </summary>
-//    public delegate void NotationChangedEventHandler(IPNotation arg_newValue);
-//    /// <summary>
-//    /// Event called if AppearanceMode Notation is changed
-//    /// </summary>
-//    public event NotationChangedEventHandler NotationChanged;
-//    /// <summary>
-//    /// Delegate for Bool-Properties-Events
-//    /// </summary>
-//    public delegate void BoolPropertyChangedEventHandler(bool arg_bNewValue);
-//    /// <summary>
-//    /// Event called if BehaviorMode OverWriteMode is changed
-//    /// </summary>
-//    public event BoolPropertyChangedEventHandler OverWriteModeChanged;
-//    /// <summary>
-//    /// Event called if BehaviorMode PreventLeave is changed
-//    /// </summary>
-//    public event BoolPropertyChangedEventHandler PreventLeaveChanged;
-
-//    /// <summary>
-//    /// Occures when Appearance-Mode Notation was changed
-//    /// </summary>
-//    /// <param name="arg_Value">Value, Input IP-Address  notation</param>
-//    protected virtual void OnNotationChanged(IPNotation arg_Value) {
-//      if (this.NotationChanged != null)
-//        this.NotationChanged(arg_Value);
-//    }
-
-//    private void ChangeNotation(IPNotation arg_oldValue, IPNotation arg_newValue) {
-//      string sTo = "";
-//      ArrayList arlFrom = new ArrayList(this.Text.Replace(" ", "").Split((char[])this.m_arlDelimeter.ToArray(typeof(char))));
-
-//      switch (arg_newValue) {
-//        case IPNotation.IPv4Decimal:
-//          this.m_regexValidNumbers = new Regex("[0-9]");
-//          this.m_arlDelimeter = new ArrayList(new char[] { '.' });
-//          break;
-//        case IPNotation.IPv4DecimalCIDR:
-//          this.m_regexValidNumbers = new Regex("[0-9]");
-//          this.m_arlDelimeter = new ArrayList(new char[] { '.', '/' });
-//          break;
-//        case IPNotation.IPv4Binary:
-//          this.m_regexValidNumbers = new Regex("[01]");
-//          this.m_arlDelimeter = new ArrayList(new char[] { '.' });
-//          break;
-//        case IPNotation.IPv4BinaryCIDR:
-//          this.m_regexValidNumbers = new Regex("[01]");
-//          this.m_arlDelimeter = new ArrayList(new char[] { '.', '/' });
-//          break;
-//        default:
-//          break;
-//      }
-
-//      switch (arg_oldValue) {
-//        case IPNotation.IPv4Decimal:
-//          switch (arg_newValue) {
-//            case IPNotation.IPv4Decimal:
-//              break;
-//            case IPNotation.IPv4DecimalCIDR:
-//              for (int i = 0; i < arlFrom.Count; i++) {
-//                sTo += arlFrom[i].ToString() +
-//                  //Add Slash if its the last IPPart, els add a dot
-//                  (i == arlFrom.Count - 1 ? "/    " : ".");
-//              }
-//              break;
-//            case IPNotation.IPv4Binary:
-//              for (int i = 0; i < arlFrom.Count; i++) {
-//                //Convert Decimal to Binary
-//                sTo += this.Dec2Bin(arlFrom[i].ToString()) +
-//                  //Add Dot if its not the last IPPart, else add nothing
-//                  (i == arlFrom.Count - 1 ? "" : ".");
-//              }
-//              break;
-//            case IPNotation.IPv4BinaryCIDR:
-//              for (int i = 0; i < arlFrom.Count; i++) {
-//                //Convert Decimal to Binary
-//                sTo += this.Dec2Bin(arlFrom[i].ToString()) +
-//                  //Add Slash if its the last IPPart, else add a dot
-//                  (i == arlFrom.Count - 1 ? "/    " : ".");
-//              }
-//              break;
-//            default:
-//              break;
-//          }
-//          break;
-//        case IPNotation.IPv4DecimalCIDR:
-//          switch (arg_newValue) {
-//            case IPNotation.IPv4Decimal:
-//              //do not use the last Item, its the Subnetmask
-//              for (int i = 0; i < arlFrom.Count - 1; i++) {
-//                sTo += arlFrom[i].ToString() +
-//                  //Add Dot if its not the last IPPart, else add nothing
-//                  (i == arlFrom.Count - 2 ? "" : ".");
-//              }
-//              break;
-//            case IPNotation.IPv4DecimalCIDR:
-//              break;
-//            case IPNotation.IPv4Binary:
-//              //do not use the last Item, its the Subnetmask
-//              for (int i = 0; i < arlFrom.Count - 1; i++) {
-//                //Convert Decimal to Binary
-//                sTo += this.Dec2Bin(arlFrom[i].ToString()) +
-//                  //Add Dot if its not the last IPPart, else add nothing
-//                  (i == arlFrom.Count - 2 ? "" : ".");
-//              }
-//              break;
-//            case IPNotation.IPv4BinaryCIDR:
-//              //do not use the last Item, its the Subnetmask
-//              for (int i = 0; i < arlFrom.Count - 1; i++) {
-//                //Convert Decimal to Binary
-//                sTo += this.Dec2Bin(arlFrom[i].ToString()) +
-//                  //Add Dot if its not the last IPPart, else add nothing
-//                  (i == arlFrom.Count - 2 ? "" : ".");
-//              }
-//              //Add Subnetmask
-//              sTo += "/" + arlFrom[arlFrom.Count - 1];
-//              break;
-//            default:
-//              break;
-//          }
-//          break;
-//        case IPNotation.IPv4Binary:
-//          switch (arg_newValue) {
-//            case IPNotation.IPv4Decimal:
-//              for (int i = 0; i < arlFrom.Count; i++) {
-//                //Convert Binary to Decimal
-//                sTo += this.Bin2Dec(arlFrom[i].ToString()) +
-//                  //Add Dot if its not the last IPPart, else add nothing
-//                  (i == arlFrom.Count - 1 ? "" : ".");
-//              }
-//              break;
-//            case IPNotation.IPv4DecimalCIDR:
-//              for (int i = 0; i < arlFrom.Count; i++) {
-//                //Convert Binary to Decimal
-//                sTo += this.Bin2Dec(arlFrom[i].ToString()) +
-//                  //Add Slash if its the last IPPart, els add a dot
-//                  (i == arlFrom.Count - 1 ? "/    " : ".");
-//              }
-//              break;
-//            case IPNotation.IPv4Binary:
-//              break;
-//            case IPNotation.IPv4BinaryCIDR:
-//              for (int i = 0; i < arlFrom.Count; i++) {
-//                sTo += arlFrom[i].ToString() +
-//                  //Add Slash if its the last IPPart, else add a dot
-//                  (i == arlFrom.Count - 1 ? "/    " : ".");
-//              }
-//              break;
-//            default:
-//              break;
-//          }
-//          break;
-//        case IPNotation.IPv4BinaryCIDR:
-//          switch (arg_newValue) {
-//            case IPNotation.IPv4Decimal:
-//              //do not use the last Item, its the Subnetmask
-//              for (int i = 0; i < arlFrom.Count - 1; i++) {
-//                sTo += this.Bin2Dec(arlFrom[i].ToString()) +
-//                  //Add Dot if its not the last IPPart, else add nothing
-//                  (i == arlFrom.Count - 2 ? "" : ".");
-//              }
-//              break;
-//            case IPNotation.IPv4DecimalCIDR:
-//              //do not use the last Item, its the Subnetmask
-//              for (int i = 0; i < arlFrom.Count - 1; i++) {
-//                sTo += this.Bin2Dec(arlFrom[i].ToString()) +
-//                  //Add Dot if its not the last IPPart, else add nothing
-//                  (i == arlFrom.Count - 2 ? "" : ".");
-//              }
-//              //Add Subnetmask
-//              sTo += "/" + arlFrom[arlFrom.Count - 1];
-//              break;
-//            case IPNotation.IPv4Binary:
-//              //do not use the last Item, its the Subnetmask
-//              for (int i = 0; i < arlFrom.Count - 1; i++) {
-//                sTo += arlFrom[i].ToString() +
-//                  //Add Dot if its not the last IPPart, else add nothing
-//                  (i == arlFrom.Count - 2 ? "" : ".");
-//              }
-//              break;
-//            case IPNotation.IPv4BinaryCIDR:
-//              break;
-//            default:
-//              break;
-//          }
-//          break;
-//        default:
-//          break;
-//      }
-
-//      this.Text = sTo;
-//      this.MaxLength = this.TextLength;
-//    }
-
-//    /// <summary>
-//    /// Occures when Behaviour-Mode OverWriteMode was changed
-//    /// </summary>
-//    /// <param name="arg_bValue">Value, Overwrite Numbers in Editfield or not</param>
-//    protected virtual void OnOverWriteChanged(bool arg_bValue) {
-//      if (this.OverWriteModeChanged != null)
-//        this.OverWriteModeChanged(arg_bValue);
-//    }
-
-//    /// <summary>
-//    /// Occures when Behaviour-Mode PreventLeave was changed
-//    /// </summary>
-//    /// <param name="arg_bValue">Value, leave control if there is an error or not</param>
-//    protected virtual void OnPreventLeaveChanged(bool arg_bValue) {
-//      if (this.PreventLeaveChanged != null)
-//        this.PreventLeaveChanged(arg_bValue);
-//    }
-
-//    #endregion //events
-
-//    #region Event-Overrides
-
-//    /// <summary>
-//    /// Override standard KeyDownEventHandler
-//    /// Catches Inputs of "." and "/" to jump to next positions
-//    /// </summary>
-//    /// <param name="e">KeyEventArgument</param>
-//    protected override void OnKeyDown(KeyEventArgs e) {
-//      //Zeichen an die richtige stelle schreiben
-//      int iPos = this.SelectionStart;
-//      char[] cText = this.Text.ToCharArray();
-
-//      if (e.Modifiers == Keys.None) {
-//        if ((char.IsLetterOrDigit(Convert.ToChar(e.KeyValue)) || e.KeyCode == Keys.NumPad0)//Numpad0=96 --> `
-//          && iPos < this.TextLength) {
-//          if (this.m_arlDelimeter.Contains(cText[iPos]))
-//            iPos += 1;
-//          this.SelectionStart = iPos;
-//          if (this.OverWriteMode) {
-//            if (iPos < this.TextLength)
-//              this.SelectionLength = 1;
-//          } else {
-//            if (iPos < this.TextLength)
-//              if (cText[iPos] == ' ')
-//                this.SelectionLength = 1;
-//          }
-//        }
-//      }
-//      base.OnKeyDown(e);
-//    }
-
-//    /// <summary>
-//    /// Override standard KeyUpEventHandler
-//    /// Catches Inputs of "." and "/" to jump to next positions
-//    /// </summary>
-//    /// <param name="e">KeyEventArgument</param>
-//    protected override void OnKeyUp(KeyEventArgs e) {
-//      //Zeichen an die richtige stelle schreiben
-//      int iPos = this.SelectionStart;
-//      char[] cText = this.Text.ToCharArray();
-
-//      //Cursor hintern Punkt setzen
-//      if ((char.IsLetterOrDigit(Convert.ToChar(e.KeyValue)) || e.KeyCode == Keys.NumPad0)//Numpad0=96 --> `
-//        && iPos < this.TextLength) {
-//        if (this.m_arlDelimeter.Contains(cText[iPos]))
-//          iPos += 1;
-
-//        this.SelectionStart = iPos;
-//      }
-//      base.OnKeyUp(e);
-//    }
-
-
-//    /// <summary>
-//    /// Override standard KeyPressEventHandler
-//    /// Catches Inputs of "." and "/" to jump to next positions
-//    /// </summary>
-//    /// <param name="e">KeyPressEventArgument</param>
-//    protected override void OnKeyPress(KeyPressEventArgs e) {
-//      //valid input charachters
-//      if (char.IsControl(e.KeyChar) ||
-//        m_regexValidNumbers.IsMatch(e.KeyChar.ToString())) {
-//        e.Handled = false;
-//      } else {
-//        switch (e.KeyChar) {
-//          case '/':
-//            this.JumpToSlash();
-//            break;
-//          case '.':
-//          case ':':
-//            this.JumpToNextDot();
-//            break;
-//          default:
-//            break;
-//        }
-//        e.Handled = true;
-//      }
-//      base.OnKeyPress(e);
-//    }
-
-//    /// <summary>
-//    /// Override standard TextChangedEventHandler
-//    /// Looks if inserted IP-Address is valid
-//    /// </summary>
-//    /// <param name="e">EventArgument</param>
-//    protected override void OnTextChanged(EventArgs e) {
-//      base.OnTextChanged(e);
-//      if (this.Text.Length == 0)
-//        this.ResetText();
-
-//      try {
-//        if (!this.ValidateIP())
-//          this.error.SetError(this, "Invalid IP-address");
-//        else
-//          this.error.SetError(this, "");
-//      }
-//      catch (Exception LastError) {
-//        this.error.SetError(this, LastError.Message);
-//      }
-//    }
-
-//    /// <summary>
-//    /// Override standard ValidatingEventHandler
-//    /// Validates inserted IP-Address, and cancels Textbox if valid or PreventLeave=false
-//    /// </summary>
-//    /// <param name="e">CancelEventArgument</param>
-//    protected override void OnValidating(CancelEventArgs e) {
-//      //e.Cancel = true;//suppress cancel-signal = not validated
-//      e.Cancel = (!this.ValidateIP() && this.m_bPreventLeave);
-//      base.OnValidating(e);
-//    }
-
-//    #endregion	//Eventhandling
-
-//    #region Methods
-
-//    /// <summary>
-//    /// Override standard ResetText
-//    /// Fills Textbox with Dots and Slashes dependend on Properties
-//    /// </summary>
-//    public override void ResetText() {
-//      base.ResetText();
-//      switch (this.Notation) {
-//        case IPNotation.IPv4Decimal:
-//          this.Text = "   .   .   .   ";
-//          break;
-//        case IPNotation.IPv4DecimalCIDR:
-//          this.Text = "   .   .   .   /    ";
-//          break;
-//        case IPNotation.IPv4Binary:
-//          this.Text = "        .        .        .        ";
-//          break;
-//        case IPNotation.IPv4BinaryCIDR:
-//          this.Text = "        .        .        .        /    ";
-//          break;
-//        default:
-//          break;
-//      }
-
-//      this.MaxLength = this.TextLength;
-//    }
-
-
-//    /// <summary>
-//    /// Window-Message Constant
-//    /// </summary>
-//    protected const int WM_KEYDOWN = 0x0100;
-
-//    /// <summary>
-//    /// Override standard PreProcessMessge
-//    /// Catches Inputs of Backspaces and Deletes to remove IP-Digits at the right position
-//    /// </summary>
-//    /// <param name="msg">Process Message</param>
-//    public override bool PreProcessMessage(ref Message msg) {
-//      if (msg.Msg == WM_KEYDOWN) {
-//        Keys keyData = ((Keys)(int)msg.WParam) | ModifierKeys;
-//        Keys keyCode = ((Keys)(int)msg.WParam);
-
-//        int iPos = this.SelectionStart;
-//        char[] cText = this.Text.ToCharArray();
-//        switch (keyCode) {
-//          case Keys.Delete:
-//            if (iPos < this.TextLength) {
-//              while (cText[iPos] == '.' || cText[iPos] == ':' || cText[iPos] == '/') {
-//                if ((iPos += 1) >= cText.Length)
-//                  break;
-//              }
-//              if (iPos < this.TextLength) {
-//                base.Text = this.Text.Substring(0, iPos) + " " + this.Text.Substring(iPos + 1);
-//                this.SelectionStart = iPos + 1;
-//              } else
-//                this.SelectionStart = this.TextLength - 1;
-//            }
-//            return true;
-//          case Keys.Back:
-//            if (iPos > 0) {
-//              while (cText[iPos - 1] == '.' || cText[iPos - 1] == ':' || cText[iPos - 1] == '/') {
-//                if ((iPos -= 1) <= 0)
-//                  break;
-//              }
-//              if (iPos > 0) {
-//                base.Text = this.Text.Substring(0, iPos - 1) + " " + this.Text.Substring(iPos);
-//                this.SelectionStart = iPos - 1;
-//              } else
-//                this.SelectionStart = 0;
-//            }
-//            return true;
-//          default:
-//            break;
-//        }
-//      }
-//      return base.PreProcessMessage(ref msg);
-//    }
-
-//    /// <summary>
-//    /// Returns the formatted IP-Addresses without spaces and Zeroes
-//    /// </summary>
-//    /// <returns>IP-Address without spaces and Zeroes</returns>
-//    public string GetPureIPAddress() {
-//      string s = "";
-//      ArrayList arlIP = new ArrayList(this.Text.Replace(" ", "").Split((char[])this.m_arlDelimeter.ToArray(typeof(char))));
-//      for (int i = 0; i < arlIP.Count; i++) {
-//        while (arlIP[i].ToString().StartsWith("0"))
-//          arlIP[i] = arlIP[i].ToString().Substring(1);
-//      }
-//      s = IPAddressTextBox.MakeIP((string[])arlIP.ToArray(typeof(string)), this.m_ipNotation);
-//      return s;
-//    }
-
-//    #endregion //Methods
-
-//    #region Helperfunctions
-
-//    /// <summary>
-//    /// Sets Inputcursor to Subnet-Slash
-//    /// </summary>
-//    private void JumpToSlash() {
-//      int iSelStart = this.Text.LastIndexOf("/");
-//      if (iSelStart >= 0) {
-//        this.Select(iSelStart + 1, 0);
-//      }
-//    }
-
-//    /// <summary>
-//    /// Sets input cursour to next Dot
-//    /// </summary>
-//    private void JumpToNextDot() {
-//      int iSelStart = this.Text.IndexOf('.', this.SelectionStart);
-//      if (iSelStart >= 0) {
-//        this.Select(iSelStart + 1, 0);
-//      } else {
-//        iSelStart = this.Text.IndexOf(':', this.SelectionStart);
-//        if (iSelStart >= 0) {
-//          this.Select(iSelStart + 1, 0);
-//        }
-//      }
-//    }
-
-//    /// <summary>
-//    /// Converts Decimal IP-Part to Binary (default IPv6 = false)
-//    /// </summary>
-//    /// <param name="arg_sDec">Decimal IP-Part</param>
-//    /// <param name="arg_bIPv6">Binary for IPv6 (has 16 digits)</param>
-//    /// <returns>Binary IP-Part</returns>
-//    private string Dec2Bin(string arg_sDec) {
-//      return this.Dec2Bin(arg_sDec, false);
-//    }
-//    /// <summary>
-//    /// Converts Decimal IP-Part to Binary
-//    /// </summary>
-//    /// <param name="arg_sDec">Decimal IP-Part</param>
-//    /// <param name="arg_bIPv6">Binary for IPv6 (has 16 digits)</param>
-//    /// <returns>Binary IP-Part</returns>
-//    private string Dec2Bin(string arg_sDec, bool arg_bIPv6) {
-//      string sBin = (arg_bIPv6 ? "0000000000000000" : "00000000"), sSubnet = "";
-//      arg_sDec = arg_sDec.Trim();
-//      while (arg_sDec.Length < 3)
-//        arg_sDec = "0" + arg_sDec;
-//      if (arg_sDec.IndexOf("/") >= 0) {
-//        sSubnet = arg_sDec.Substring(arg_sDec.IndexOf("/"));
-//        arg_sDec = arg_sDec.Substring(0, arg_sDec.IndexOf("/"));
-//      }
-//      int iDec = Convert.ToInt32(arg_sDec, 10);
-//      sBin = Convert.ToString(iDec, 2);
-//      while (sBin.Length < (arg_bIPv6 ? 16 : 8))
-//        sBin = "0" + sBin;
-//      return sBin + sSubnet;
-//    }
-
-//    /// <summary>
-//    /// Converts Binary IP-Part to Decimal
-//    /// </summary>
-//    /// <param name="arg_sBin">Binary IP-Part</param>
-//    /// <returns>Decimal IP-Part</returns>
-//    private string Bin2Dec(string arg_sBin) {
-//      string sDec = "000", sSubnet = "";
-//      arg_sBin = arg_sBin.Trim();
-//      while (arg_sBin.Length < 8)
-//        arg_sBin = "0" + arg_sBin;
-//      if (arg_sBin.IndexOf("/") >= 0) {
-//        sSubnet = arg_sBin.Substring(arg_sBin.IndexOf("/"));
-//        arg_sBin = arg_sBin.Substring(0, arg_sBin.IndexOf("/"));
-//      }
-//      int iBin = Convert.ToInt32(arg_sBin, 2);
-//      if (iBin > 255)
-//        throw new Exception(string.Format("Can't convert Binary to Decimal IP-Address\nbin:{0} is greater than 255", iBin));
-//      sDec = Convert.ToString(iBin, 10);
-//      while (sDec.Length < 3)
-//        sDec = "0" + sDec;
-//      return sDec + sSubnet;
-//    }
-
-//    /// <summary>
-//    /// Converts Binary IP-Part to Hexadecimal
-//    /// </summary>
-//    /// <param name="arg_sBin">Binary IP-Part</param>
-//    /// <returns>Hexadecimal IP-Part</returns>
-//    private string Bin2Hex(string arg_sBin) {
-//      string sHex = "0000", sSubnet = "";
-//      arg_sBin = arg_sBin.Trim();
-//      while (arg_sBin.Length < 8)
-//        arg_sBin = "0" + arg_sBin;
-//      if (arg_sBin.IndexOf("/") >= 0) {
-//        sSubnet = arg_sBin.Substring(arg_sBin.IndexOf("/"));
-//        arg_sBin = arg_sBin.Substring(0, arg_sBin.IndexOf("/"));
-//      }
-//      int iBin = Convert.ToInt32(arg_sBin, 2);
-//      sHex = Convert.ToString(iBin, 16);
-//      while (sHex.Length < 4)
-//        sHex = "0" + sHex;
-//      return sHex + sSubnet;
-//    }
-
-//    /// <summary>
-//    /// Converts Hexadecimal IP-Part to Binary (default IPv6=true)
-//    /// </summary>
-//    /// <param name="arg_sHex">Hexadecimal IP-Part</param>
-//    /// <returns>Binary IP-Part</returns>
-//    private string Hex2Bin(string arg_sHex) {
-//      return this.Hex2Bin(arg_sHex, true);
-//    }
-//    /// <summary>
-//    /// Converts Hexadecimal IP-Part to Binary
-//    /// </summary>
-//    /// <param name="arg_sHex">Hexadecimal IP-Part</param>
-//    /// <param name="arg_bIPv6">Binary for IPv6 (16 digits)</param>
-//    /// <returns>Binary IP-Part</returns>
-//    private string Hex2Bin(string arg_sHex, bool arg_bIPv6) {
-//      string sBin = (arg_bIPv6 ? "0000000000000000" : "00000000"), sSubnet = "";
-//      arg_sHex = arg_sHex.Trim();
-//      while (arg_sHex.Length < 3)
-//        arg_sHex = "0" + arg_sHex;
-//      if (arg_sHex.IndexOf("/") >= 0) {
-//        sSubnet = arg_sHex.Substring(arg_sHex.IndexOf("/"));
-//        arg_sHex = arg_sHex.Substring(0, arg_sHex.IndexOf("/"));
-//      }
-//      int iHex = Convert.ToInt32(arg_sHex, 16);
-//      if (iHex > 255 && !arg_bIPv6)
-//        throw new Exception(string.Format("Can't convert Hexadecimal to Binary IP-Address\nhex:{0} is greater than 11111111", iHex));
-//      sBin = Convert.ToString(iHex, 2);
-//      while (sBin.Length < (arg_bIPv6 ? 16 : 8))
-//        sBin = "0" + sBin;
-//      return sBin + sSubnet;
-//    }
-
-//    /// <summary>
-//    /// Converts Decimal IP-Part to Hexadecimal
-//    /// </summary>
-//    /// <param name="arg_sDec">Decimal IP-Part</param>
-//    /// <returns>Hexadecimal IP-Part</returns>
-//    private string Dec2Hex(string arg_sDec) {
-//      string sHex = "0000", sSubnet = "";
-//      arg_sDec = arg_sDec.Trim();
-//      while (arg_sDec.Length < 8)
-//        arg_sDec = "0" + arg_sDec;
-//      if (arg_sDec.IndexOf("/") >= 0) {
-//        sSubnet = arg_sDec.Substring(arg_sDec.IndexOf("/"));
-//        arg_sDec = arg_sDec.Substring(0, arg_sDec.IndexOf("/"));
-//      }
-//      int iDec = Convert.ToInt32(arg_sDec, 10);
-//      sHex = Convert.ToString(iDec, 16);
-//      while (sHex.Length < 4)
-//        sHex = "0" + sHex;
-//      return sHex + sSubnet;
-//    }
-
-//    /// <summary>
-//    /// Converts Hexadecimal IP-Part to Decimal
-//    /// </summary>
-//    /// <param name="arg_sHex">Hexadecimal IP-Part</param>
-//    /// <returns>Decimal IP-Part</returns>
-//    private string Hex2Dec(string arg_sHex) {
-//      string sDec = "000", sSubnet = "";
-//      arg_sHex = arg_sHex.Trim();
-//      while (arg_sHex.Length < 8)
-//        arg_sHex = "0" + arg_sHex;
-//      if (arg_sHex.IndexOf("/") >= 0) {
-//        sSubnet = arg_sHex.Substring(arg_sHex.IndexOf("/"));
-//        arg_sHex = arg_sHex.Substring(0, arg_sHex.IndexOf("/"));
-//      }
-//      int iHex = Convert.ToInt32(arg_sHex, 16);
-//      if (iHex > 255)
-//        throw new Exception(string.Format("Can't convert Hexadecimal to Decimal IP-Address\nhex:{0} is greater than 255", iHex));
-//      sDec = Convert.ToString(iHex, 10);
-//      while (sDec.Length < 3)
-//        sDec = "0" + sDec;
-//      return sDec + sSubnet;
-//    }
-
-//    /// <summary>
-//    /// Checks if IP in Textfield is valid
-//    /// </summary>
-//    /// <returns>true/false valid/not</returns>
-//    private bool ValidateIP() {
-//      if (IPAddressTextBox.ValidateIP(this.Text, this.m_newIPNotation, this.m_arlDelimeter))
-//        return true;
-//      else
-//        //if Control is not visible or enabled, it doesn't matter if IP is valid
-//        return this.Enabled || this.Visible ? false : true;
-//    }
-
-//    /// <summary>
-//    /// Checks if the given String is an valid ip-address
-//    /// </summary>
-//    /// <param name="arg_sIP">IP-String</param>
-//    /// <param name="arg_ipNotation">IP-notation</param>
-//    /// <param name="arg_arlDelimeter">Delimeter to parse IPString</param>
-//    /// <returns>true/false validated/not</returns>
-//    protected static bool ValidateIP(string arg_sIP, IPNotation arg_ipNotation, ArrayList arg_arlDelimeter) {
-//      bool bValidated = false;
-//      ArrayList arlIP = new ArrayList(arg_sIP.Split((char[])arg_arlDelimeter.ToArray(typeof(char))));
-
-//      try {
-//        switch (arg_ipNotation) {
-//          case IPNotation.IPv4Decimal:
-//          case IPNotation.IPv4Binary:
-//            bValidated = arlIP.Count == 4;
-//            break;
-//          case IPNotation.IPv4DecimalCIDR:
-//          case IPNotation.IPv4BinaryCIDR:
-//            bValidated = arlIP.Count == 5;
-//            break;
-//          default:
-//            break;
-//        }
-//        if (!bValidated) {
-//          throw new Exception("IP-Address has wrong element count");
-//        }
-
-//        //don't check the 1st 2 elemnt if its IPv4 in IPv6-notation
-//        for (int i = (arg_ipNotation.ToString().IndexOf("IPv6IPv4") == 0 ? 2 : 0);
-//          //don't check the subnet element
-//          i < (arg_ipNotation.ToString().IndexOf("CIDR") > 0 ? arlIP.Count - 1 : arlIP.Count);
-//          i++) {
-//          string sIPPart = arlIP[i].ToString().Replace(" ", "");
-//          int iIPPart = 0;
-//          switch (arg_ipNotation) {
-//            case IPNotation.IPv4Decimal:
-//            case IPNotation.IPv4DecimalCIDR:
-//              while (sIPPart.Length < 3)
-//                sIPPart = "0" + sIPPart;
-//              iIPPart = Convert.ToInt32(sIPPart, 10);
-//              if (iIPPart < 256)
-//                bValidated = true;
-//              else
-//                bValidated = false;
-//              break;
-//            case IPNotation.IPv4Binary:
-//            case IPNotation.IPv4BinaryCIDR:
-//              while (sIPPart.Length < 8)
-//                sIPPart = "0" + sIPPart;
-//              iIPPart = Convert.ToInt32(sIPPart, 2);
-//              if (iIPPart < 256)
-//                bValidated = true;
-//              else
-//                bValidated = false;
-//              break;
-//            default:
-//              break;
-//          }
-//          if (!bValidated) {
-//            throw new Exception(string.Format("IP-Address element {0}({1}) has wrong format", i, sIPPart));
-//          }
-//        }
-//      }
-//      catch (Exception LastError) {
-//        System.Diagnostics.Debug.WriteLine(LastError.Message);
-//        bValidated = false;
-//        throw LastError;
-//      }
-//      return bValidated;
-//    }
-
-//    /// <summary>
-//    /// Adds Spaces to given IP-Address, so it fits in the textfield
-//    /// </summary>
-//    /// <param name="arg_sIP">IP-String</param>
-//    /// <param name="arg_ipNotation">IP-notation</param>
-//    /// <param name="arg_arlDelimeter">Delimeter to parse IPString</param>
-//    /// <returns>IP-Address with Spaces</returns>
-//    protected static string MakeValidSpaces(string arg_sIP, IPNotation arg_ipNotation, ArrayList arg_arlDelimeter) {
-//      ArrayList arlIP = new ArrayList(arg_sIP.Split((char[])arg_arlDelimeter.ToArray(typeof(char))));
-//      //don't check the 1st 2 elemnt if its IPv4 in IPv6-notation
-//      for (int i = (arg_ipNotation.ToString().IndexOf("IPv6IPv4") == 0 ? 2 : 0);
-//        //don't check the subnet element
-//        i < (arg_ipNotation.ToString().IndexOf("CIDR") > 0 ? arlIP.Count - 1 : arlIP.Count);
-//        i++) {
-//        switch (arg_ipNotation) {
-//          case IPNotation.IPv4Decimal:
-//          case IPNotation.IPv4DecimalCIDR:
-//            while (arlIP[i].ToString().Length < 3)
-//              arlIP[i] = arlIP[i].ToString() + " ";
-//            break;
-//          case IPNotation.IPv4Binary:
-//          case IPNotation.IPv4BinaryCIDR:
-//            while (arlIP[i].ToString().Length < 8)
-//              arlIP[i] = arlIP[i].ToString() + " ";
-//            break;
-//          default:
-//            break;
-//        }
-//      }
-
-//      return IPAddressTextBox.MakeIP((string[])arlIP.ToArray(typeof(string)), arg_ipNotation);
-//    }
-
-//    /// <summary>
-//    /// Adds Zeroes to given IP-Address, so it fits in the textfield
-//    /// </summary>
-//    /// <param name="arg_sIP">IP-String</param>
-//    /// <param name="arg_ipNotation">IP-notation</param>
-//    /// <param name="arg_arlDelimeter">Delimeter to parse IPString</param>
-//    /// <returns>IP-Address with Spaces</returns>
-//    protected static string MakeValidZeroes(string arg_sIP, IPNotation arg_ipNotation, ArrayList arg_arlDelimeter) {
-//      ArrayList arlIP = new ArrayList(arg_sIP.Split((char[])arg_arlDelimeter.ToArray(typeof(char))));
-//      //don't check the 1st 2 elemnt if its IPv4 in IPv6-notation
-//      for (int i = (arg_ipNotation.ToString().IndexOf("IPv6IPv4") == 0 ? 2 : 0);
-//        //don't check the subnet element
-//        i < (arg_ipNotation.ToString().IndexOf("CIDR") > 0 ? arlIP.Count - 1 : arlIP.Count);
-//        i++) {
-//        switch (arg_ipNotation) {
-//          case IPNotation.IPv4Decimal:
-//          case IPNotation.IPv4DecimalCIDR:
-//            while (arlIP[i].ToString().Length < 3)
-//              arlIP[i] = "0" + arlIP[i].ToString();
-//            break;
-//          case IPNotation.IPv4Binary:
-//          case IPNotation.IPv4BinaryCIDR:
-//            while (arlIP[i].ToString().Length < 8)
-//              arlIP[i] = "0" + arlIP[i].ToString();
-//            break;
-//          default:
-//            break;
-//        }
-//      }
-
-//      return IPAddressTextBox.MakeIP((string[])arlIP.ToArray(typeof(string)), arg_ipNotation);
-//    }
-
-//    /// <summary>
-//    /// Creates IP-Addresstring from given StrignArray and Notation
-//    /// </summary>
-//    /// <param name="arg_sIP">String-Array with elements for IP-Address</param>
-//    /// <param name="arg_ipNotation">Notation of IP-Address</param>
-//    /// <returns>IPAddress-String</returns>
-//    protected static string MakeIP(string[] arg_sIP, IPNotation arg_ipNotation) {
-//      string s = "";
-//      for (int i = 0; i < arg_sIP.Length; i++) {
-//        switch (arg_ipNotation) {
-//          case IPNotation.IPv4Decimal:
-//          case IPNotation.IPv4Binary:
-//            s += (arg_sIP[i].Length > 0 ? arg_sIP[i] : "0") + (i < (arg_sIP.Length - 1) ? "." : "");
-//            break;
-//          case IPNotation.IPv4DecimalCIDR:
-//          case IPNotation.IPv4BinaryCIDR:
-//            s += (arg_sIP[i].Length > 0 ? arg_sIP[i] : "0") + (i < (arg_sIP.Length - 2) ? "." : (i < arg_sIP.Length - 1) ? "/" : "");
-//            break;
-//          default:
-//            break;
-//        }
-//      }
-//      return s;
-//    }
-
-//    #endregion //Helperfunctions
-//  }
-//}
