Index: branches/2915-AbsoluteSymbol/HeuristicLab.Clients.Hive.Administrator/3.3/Views/SlaveView.cs
===================================================================
--- branches/2915-AbsoluteSymbol/HeuristicLab.Clients.Hive.Administrator/3.3/Views/SlaveView.cs	(revision 15943)
+++ branches/2915-AbsoluteSymbol/HeuristicLab.Clients.Hive.Administrator/3.3/Views/SlaveView.cs	(revision 16240)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -22,15 +22,13 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Clients.Access;
-using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
 
 namespace HeuristicLab.Clients.Hive.Administrator.Views {
-  [View("SlaveView")]
-  [Content(typeof(Resource), IsDefaultView = true)]
-  public partial class SlaveView : ItemView {
-    public new Resource Content {
-      get { return (Resource)base.Content; }
+  [View("Slave View")]
+  [Content(typeof(Slave), IsDefaultView = true)]
+  public sealed partial class SlaveView : ResourceView {
+    public new Slave Content {
+      get { return (Slave)base.Content; }
       set { base.Content = value; }
     }
@@ -40,123 +38,37 @@
     }
 
-    #region Register Content Events
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-    }
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-    }
-    #endregion
-
+    #region Overrides
     protected override void OnContentChanged() {
       base.OnContentChanged();
       if (Content == null) {
-        ShowSlaveUI(true);
-        txtName.Clear();
-        txtCPU.Clear();
-        txtDetailsDescription.Clear();
-        txtMemory.Clear();
-        txtOS.Clear();
-        txtSlaveState.Clear();
-        txtLastHeartbeat.Clear();
-        txtFreeMemory.Clear();
-        txtId.Clear();
-        txtHbIntervall.Clear();
-        cbxDisposable.Checked = false;
-        cbxPublic.Checked = false;
+        cpuTextBox.Clear();
+        memoryTextBox.Clear();
+        operatingSystemTextBox.Clear();
+        stateTextBox.Clear();
+        lastHeartbeatTextBox.Clear();
+        disposableCheckBox.Checked = false;
       } else {
-        if (Content.GetType() == typeof(Slave)) {
-          ShowSlaveUI(true);
-          Slave ct = (Slave)Content;
-          bool authorized = UserInformation.Instance.UserExists && (ct.OwnerUserId == UserInformation.Instance.User.Id || HiveRoles.CheckAdminUserPermissions());
-          txtName.Text = ct.Name;
-          txtHbIntervall.Text = ct.HbInterval.ToString();
-          cbxPublic.Enabled = authorized;
-          cbxPublic.CheckedChanged -= new EventHandler(cbxPublic_CheckedChanged);
-          cbxPublic.Checked = ct.OwnerUserId == null;
-          cbxPublic.CheckedChanged += new EventHandler(cbxPublic_CheckedChanged);
-          txtCPU.Text = string.Format("{0} Cores @ {1} Mhz, Arch.: {2}", ct.Cores.ToString(), ct.CpuSpeed.ToString(), ct.CpuArchitecture.ToString());
-          txtDetailsDescription.Text = ct.Description;
-          txtMemory.Text = ct.Memory.ToString();
-          txtOS.Text = ct.OperatingSystem;
-          txtSlaveState.Text = ct.SlaveState.ToString();
-          txtLastHeartbeat.Text = ct.LastHeartbeat.ToString();
-          txtFreeMemory.Text = ct.FreeMemory.ToString();
-          txtId.Text = ct.Id.ToString();
-          cbxDisposable.Enabled = authorized;
-          cbxDisposable.Checked = ct.IsDisposable.GetValueOrDefault();
-        } else if (Content.GetType() == typeof(SlaveGroup)) {
-          SlaveGroup ct = (SlaveGroup)Content;
-          txtName.Text = ct.Name;
-          txtHbIntervall.Text = ct.HbInterval.ToString();
-          cbxPublic.Enabled = ct.Name != "UNGROUPED" && HiveRoles.CheckAdminUserPermissions();
-          cbxPublic.CheckedChanged -= new EventHandler(cbxPublic_CheckedChanged);
-          cbxPublic.Checked = ct.OwnerUserId == null;
-          cbxPublic.CheckedChanged += new EventHandler(cbxPublic_CheckedChanged);
-          ShowSlaveUI(false);
-        } else {
-          throw new Exception("Unknown Resource in SlaveView");
-        }
+        cpuTextBox.Text = string.Format("{0} Cores @ {1} MHz, Arch.: {2}", Content.Cores, Content.CpuSpeed, Content.CpuArchitecture);
+        memoryTextBox.Text = string.Format("{0} ({1} Free)", Content.Memory, Content.FreeMemory);
+        operatingSystemTextBox.Text = Content.OperatingSystem;
+        stateTextBox.Text = Content.SlaveState.ToString();
+        lastHeartbeatTextBox.Text = Content.LastHeartbeat.ToString();
+        disposableCheckBox.Checked = Content.IsDisposable.GetValueOrDefault();
       }
-    }
-
-    private void ShowSlaveUI(bool show) {
-      label1.Visible = show;
-      label2.Visible = show;
-      label4.Visible = show;
-      label10.Visible = show;
-      label11.Visible = show;
-      label12.Visible = show;
-      label13.Visible = show;
-      label14.Visible = show;
-      label15.Visible = show;
-      txtCPU.Visible = show;
-      txtDetailsDescription.Visible = show;
-      txtMemory.Visible = show;
-      txtOS.Visible = show;
-      txtSlaveState.Visible = show;
-      txtLastHeartbeat.Visible = show;
-      txtFreeMemory.Visible = show;
-      txtId.Visible = show;
-      txtName.Enabled = !show;
-      cbxDisposable.Visible = show;
     }
 
     protected override void SetEnabledStateOfControls() {
       base.SetEnabledStateOfControls();
+      bool enabled = Content != null && !Locked;
+      disposableCheckBox.Enabled = enabled;
     }
+    #endregion
 
-    private void txtName_TextChanged(object sender, EventArgs e) {
-      if (Content != null && Content is SlaveGroup) {
-        Content.Name = txtName.Text;
-      }
+    #region Event Handlers
+    private void disposableCheckBox_CheckedChanged(object sender, EventArgs e) {
+      if (Content != null)
+        Content.IsDisposable = disposableCheckBox.Checked;
     }
-
-    private void txtHbIntervall_TextChanged(object sender, EventArgs e) {
-      if (Content != null) {
-        if (txtHbIntervall.Text.Length > 0) {
-          try {
-            int interval = int.Parse(txtHbIntervall.Text);
-            Content.HbInterval = interval;
-          }
-          catch (Exception) {
-            MessageBox.Show("Please enter a numeric value for the Heartbeat Interval.", "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Error);
-            txtHbIntervall.Text = "10";
-          }
-        }
-      }
-    }
-
-    private void cbxDisposable_CheckedChanged(object sender, EventArgs e) {
-      if (Content != null) {
-        ((Slave)Content).IsDisposable = cbxDisposable.Checked;
-      }
-    }
-
-    private void cbxPublic_CheckedChanged(object sender, EventArgs e) {
-      if (Content != null) {
-        Content.OwnerUserId = cbxPublic.Checked ? null : new Guid?(UserInformation.Instance.User.Id);
-      }
-    }
+    #endregion
   }
 }
