Index: /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/HeuristicLab.Clients.Hive.Administrator-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/HeuristicLab.Clients.Hive.Administrator-3.3.csproj	(revision 9015)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/HeuristicLab.Clients.Hive.Administrator-3.3.csproj	(revision 9016)
@@ -104,15 +104,15 @@
   <ItemGroup>
     <Compile Include="HiveRoles.cs" />
-    <Compile Include="Views\AppointmentTypeDialog.cs">
+    <Compile Include="Views\DowntimeTypeDialog.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="Views\AppointmentTypeDialog.Designer.cs">
-      <DependentUpon>AppointmentTypeDialog.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Views\AppointmentTypeView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="Views\AppointmentTypeView.Designer.cs">
-      <DependentUpon>AppointmentTypeView.cs</DependentUpon>
+    <Compile Include="Views\DowntimeTypeDialog.Designer.cs">
+      <DependentUpon>DowntimeTypeDialog.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Views\DowntimeTypeView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Views\DowntimeTypeView.Designer.cs">
+      <DependentUpon>DowntimeTypeView.cs</DependentUpon>
     </Compile>
     <Compile Include="Views\HiveAdministratorView.cs">
@@ -122,5 +122,5 @@
       <DependentUpon>HiveAdministratorView.cs</DependentUpon>
     </Compile>
-    <Compile Include="HiveAppointment.cs">
+    <Compile Include="HiveDowntime.cs">
       <SubType>Code</SubType>
     </Compile>
Index: /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/HiveDowntime.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/HiveDowntime.cs	(revision 9016)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/HiveDowntime.cs	(revision 9016)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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;
+
+namespace HeuristicLab.Clients.Hive.Administrator.Views {
+  public class HiveDowntime : Calendar.Appointment {
+    private Guid recurringId = Guid.Empty;
+
+    public HiveDowntime()
+      : base() {
+      Changed = false;
+    }
+
+    public bool Changed { get; set; }
+
+    public new bool AllDayEvent {
+      get { return base.AllDayEvent; }
+      set { base.AllDayEvent = value; Changed = true; }
+    }
+
+    public new bool Recurring {
+      get { return base.Recurring; }
+      set { base.Recurring = value; Changed = true; }
+    }
+
+    public Guid RecurringId {
+      get { return recurringId; }
+      set { recurringId = value; Changed = true; }
+    }
+
+    public new DateTime EndDate {
+      get { return base.EndDate; }
+      set { base.EndDate = value; Changed = true; }
+    }
+
+    public new DateTime StartDate {
+      get { return base.StartDate; }
+      set { base.StartDate = value; Changed = true; }
+    }
+
+    public bool Deleted { get; set; }
+
+    public Guid Id { get; set; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/RecurrentEvent.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/RecurrentEvent.cs	(revision 9015)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/RecurrentEvent.cs	(revision 9016)
@@ -29,5 +29,5 @@
     public bool AllDay { get; set; }
     public HashSet<DayOfWeek> WeekDays { get; set; }
-    public DowntimeType AppointmentType { get; set; }
+    public DowntimeType DowntimeType { get; set; }
   }
 }
Index: unk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/AppointmentTypeDialog.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/AppointmentTypeDialog.Designer.cs	(revision 9015)
+++ 	(revision )
@@ -1,91 +1,0 @@
-﻿namespace HeuristicLab.Clients.Hive.Administrator.Views {
-  partial class AppointmentTypeDialog {
-    /// <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.okButton = new System.Windows.Forms.Button();
-      this.cancleButton = new System.Windows.Forms.Button();
-      this.appointmentTypeView = new HeuristicLab.Clients.Hive.Administrator.Views.AppointmentTypeView();
-      this.SuspendLayout();
-      // 
-      // okButton
-      // 
-      this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
-      this.okButton.Location = new System.Drawing.Point(12, 75);
-      this.okButton.Name = "okButton";
-      this.okButton.Size = new System.Drawing.Size(75, 23);
-      this.okButton.TabIndex = 0;
-      this.okButton.Text = "OK";
-      this.okButton.UseVisualStyleBackColor = true;
-      this.okButton.Click += new System.EventHandler(this.okButton_Click);
-      // 
-      // cancleButton
-      // 
-      this.cancleButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-      this.cancleButton.Location = new System.Drawing.Point(127, 75);
-      this.cancleButton.Name = "cancleButton";
-      this.cancleButton.Size = new System.Drawing.Size(75, 23);
-      this.cancleButton.TabIndex = 1;
-      this.cancleButton.Text = "Cancel";
-      this.cancleButton.UseVisualStyleBackColor = true;
-      this.cancleButton.Click += new System.EventHandler(this.cancleButton_Click);
-      // 
-      // appointmentTypeView
-      // 
-      this.appointmentTypeView.AppointmentType = HeuristicLab.Clients.Hive.DowntimeType.Offline;
-      this.appointmentTypeView.Location = new System.Drawing.Point(12, 12);
-      this.appointmentTypeView.Name = "appointmentTypeView";
-      this.appointmentTypeView.Size = new System.Drawing.Size(120, 57);
-      this.appointmentTypeView.TabIndex = 2;
-      // 
-      // AppointmentTypeDialog
-      // 
-      this.AcceptButton = this.okButton;
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.CancelButton = this.cancleButton;
-      this.ClientSize = new System.Drawing.Size(214, 108);
-      this.Controls.Add(this.appointmentTypeView);
-      this.Controls.Add(this.cancleButton);
-      this.Controls.Add(this.okButton);
-      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
-      this.MaximizeBox = false;
-      this.MinimizeBox = false;
-      this.Name = "AppointmentTypeDialog";
-      this.ShowIcon = false;
-      this.ShowInTaskbar = false;
-      this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
-      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
-      this.Text = "Select Type of Downtime";
-      this.TopMost = true;
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.Button okButton;
-    private System.Windows.Forms.Button cancleButton;
-    private AppointmentTypeView appointmentTypeView;
-  }
-}
Index: unk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/AppointmentTypeDialog.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/AppointmentTypeDialog.cs	(revision 9015)
+++ 	(revision )
@@ -1,44 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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.Windows.Forms;
-
-namespace HeuristicLab.Clients.Hive.Administrator.Views {
-  public partial class AppointmentTypeDialog : Form {
-    public DowntimeType AppointmentType {
-      get {
-        return appointmentTypeView.AppointmentType;
-      }
-    }
-
-    public AppointmentTypeDialog() {
-      InitializeComponent();
-    }
-
-    private void okButton_Click(object sender, System.EventArgs e) {
-      Close();
-    }
-
-    private void cancleButton_Click(object sender, System.EventArgs e) {
-      Close();
-    }
-  }
-}
Index: unk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/AppointmentTypeView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/AppointmentTypeView.Designer.cs	(revision 9015)
+++ 	(revision )
@@ -1,87 +1,0 @@
-﻿namespace HeuristicLab.Clients.Hive.Administrator.Views {
-  partial class AppointmentTypeView {
-    /// <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 Component 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.OfflineRadioButton = new System.Windows.Forms.RadioButton();
-      this.shutdownRadioButton = new System.Windows.Forms.RadioButton();
-      this.panel1 = new System.Windows.Forms.Panel();
-      this.panel1.SuspendLayout();
-      this.SuspendLayout();
-      // 
-      // OfflineRadioButton
-      // 
-      this.OfflineRadioButton.AutoSize = true;
-      this.OfflineRadioButton.Checked = true;
-      this.OfflineRadioButton.Location = new System.Drawing.Point(3, 3);
-      this.OfflineRadioButton.Name = "OfflineRadioButton";
-      this.OfflineRadioButton.Size = new System.Drawing.Size(55, 17);
-      this.OfflineRadioButton.TabIndex = 0;
-      this.OfflineRadioButton.TabStop = true;
-      this.OfflineRadioButton.Tag = "Offline";
-      this.OfflineRadioButton.Text = "Offline";
-      this.OfflineRadioButton.UseVisualStyleBackColor = true;
-      this.OfflineRadioButton.CheckedChanged += new System.EventHandler(this.OfflineRadioButton_CheckedChanged);
-      // 
-      // shutdownRadioButton
-      // 
-      this.shutdownRadioButton.AutoSize = true;
-      this.shutdownRadioButton.Location = new System.Drawing.Point(3, 26);
-      this.shutdownRadioButton.Name = "shutdownRadioButton";
-      this.shutdownRadioButton.Size = new System.Drawing.Size(105, 17);
-      this.shutdownRadioButton.TabIndex = 1;
-      this.shutdownRadioButton.TabStop = true;
-      this.shutdownRadioButton.Tag = "Shutdown";
-      this.shutdownRadioButton.Text = "Shutdown Signal";
-      this.shutdownRadioButton.UseVisualStyleBackColor = true;
-      this.shutdownRadioButton.CheckedChanged += new System.EventHandler(this.shutdownRadioButton_CheckedChanged);
-      // 
-      // panel1
-      // 
-      this.panel1.Controls.Add(this.shutdownRadioButton);
-      this.panel1.Controls.Add(this.OfflineRadioButton);
-      this.panel1.Location = new System.Drawing.Point(3, 3);
-      this.panel1.Name = "panel1";
-      this.panel1.Size = new System.Drawing.Size(114, 51);
-      this.panel1.TabIndex = 2;
-      // 
-      // AppointmentTypeView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.panel1);
-      this.Name = "AppointmentTypeView";
-      this.Size = new System.Drawing.Size(120, 57);
-      this.panel1.ResumeLayout(false);
-      this.panel1.PerformLayout();
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.RadioButton OfflineRadioButton;
-    private System.Windows.Forms.RadioButton shutdownRadioButton;
-    private System.Windows.Forms.Panel panel1;
-  }
-}
Index: unk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/AppointmentTypeView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/AppointmentTypeView.cs	(revision 9015)
+++ 	(revision )
@@ -1,42 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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.Windows.Forms;
-
-namespace HeuristicLab.Clients.Hive.Administrator.Views {
-  public partial class AppointmentTypeView : UserControl {
-    public DowntimeType AppointmentType { get; set; }
-
-    public AppointmentTypeView() {
-      InitializeComponent();
-      AppointmentType = DowntimeType.Offline;
-    }
-
-    private void OfflineRadioButton_CheckedChanged(object sender, EventArgs e) {
-      AppointmentType = DowntimeType.Offline;
-    }
-
-    private void shutdownRadioButton_CheckedChanged(object sender, EventArgs e) {
-      AppointmentType = DowntimeType.Shutdown;
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeDialog.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeDialog.Designer.cs	(revision 9016)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeDialog.Designer.cs	(revision 9016)
@@ -0,0 +1,112 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Clients.Hive.Administrator.Views {
+  partial class DowntimeTypeDialog {
+    /// <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.okButton = new System.Windows.Forms.Button();
+      this.cancleButton = new System.Windows.Forms.Button();
+      this.appointmentTypeView = new HeuristicLab.Clients.Hive.Administrator.Views.DowntimeTypeView();
+      this.SuspendLayout();
+      // 
+      // okButton
+      // 
+      this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
+      this.okButton.Location = new System.Drawing.Point(12, 75);
+      this.okButton.Name = "okButton";
+      this.okButton.Size = new System.Drawing.Size(75, 23);
+      this.okButton.TabIndex = 0;
+      this.okButton.Text = "OK";
+      this.okButton.UseVisualStyleBackColor = true;
+      this.okButton.Click += new System.EventHandler(this.okButton_Click);
+      // 
+      // cancleButton
+      // 
+      this.cancleButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+      this.cancleButton.Location = new System.Drawing.Point(127, 75);
+      this.cancleButton.Name = "cancleButton";
+      this.cancleButton.Size = new System.Drawing.Size(75, 23);
+      this.cancleButton.TabIndex = 1;
+      this.cancleButton.Text = "Cancel";
+      this.cancleButton.UseVisualStyleBackColor = true;
+      this.cancleButton.Click += new System.EventHandler(this.cancleButton_Click);
+      // 
+      // appointmentTypeView
+      // 
+      this.appointmentTypeView.DowntimeType = HeuristicLab.Clients.Hive.DowntimeType.Offline;
+      this.appointmentTypeView.Location = new System.Drawing.Point(12, 12);
+      this.appointmentTypeView.Name = "appointmentTypeView";
+      this.appointmentTypeView.Size = new System.Drawing.Size(120, 57);
+      this.appointmentTypeView.TabIndex = 2;
+      // 
+      // AppointmentTypeDialog
+      // 
+      this.AcceptButton = this.okButton;
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.CancelButton = this.cancleButton;
+      this.ClientSize = new System.Drawing.Size(214, 108);
+      this.Controls.Add(this.appointmentTypeView);
+      this.Controls.Add(this.cancleButton);
+      this.Controls.Add(this.okButton);
+      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+      this.MaximizeBox = false;
+      this.MinimizeBox = false;
+      this.Name = "AppointmentTypeDialog";
+      this.ShowIcon = false;
+      this.ShowInTaskbar = false;
+      this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+      this.Text = "Select Type of Downtime";
+      this.TopMost = true;
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button okButton;
+    private System.Windows.Forms.Button cancleButton;
+    private DowntimeTypeView appointmentTypeView;
+  }
+}
Index: /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeDialog.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeDialog.cs	(revision 9016)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeDialog.cs	(revision 9016)
@@ -0,0 +1,44 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Windows.Forms;
+
+namespace HeuristicLab.Clients.Hive.Administrator.Views {
+  public partial class DowntimeTypeDialog : Form {
+    public DowntimeType AppointmentType {
+      get {
+        return appointmentTypeView.DowntimeType;
+      }
+    }
+
+    public DowntimeTypeDialog() {
+      InitializeComponent();
+    }
+
+    private void okButton_Click(object sender, System.EventArgs e) {
+      Close();
+    }
+
+    private void cancleButton_Click(object sender, System.EventArgs e) {
+      Close();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeView.Designer.cs	(revision 9016)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeView.Designer.cs	(revision 9016)
@@ -0,0 +1,108 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Clients.Hive.Administrator.Views {
+  partial class DowntimeTypeView {
+    /// <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 Component 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.OfflineRadioButton = new System.Windows.Forms.RadioButton();
+      this.shutdownRadioButton = new System.Windows.Forms.RadioButton();
+      this.panel1 = new System.Windows.Forms.Panel();
+      this.panel1.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // OfflineRadioButton
+      // 
+      this.OfflineRadioButton.AutoSize = true;
+      this.OfflineRadioButton.Checked = true;
+      this.OfflineRadioButton.Location = new System.Drawing.Point(3, 3);
+      this.OfflineRadioButton.Name = "OfflineRadioButton";
+      this.OfflineRadioButton.Size = new System.Drawing.Size(55, 17);
+      this.OfflineRadioButton.TabIndex = 0;
+      this.OfflineRadioButton.TabStop = true;
+      this.OfflineRadioButton.Tag = "Offline";
+      this.OfflineRadioButton.Text = "Offline";
+      this.OfflineRadioButton.UseVisualStyleBackColor = true;
+      this.OfflineRadioButton.CheckedChanged += new System.EventHandler(this.OfflineRadioButton_CheckedChanged);
+      // 
+      // shutdownRadioButton
+      // 
+      this.shutdownRadioButton.AutoSize = true;
+      this.shutdownRadioButton.Location = new System.Drawing.Point(3, 26);
+      this.shutdownRadioButton.Name = "shutdownRadioButton";
+      this.shutdownRadioButton.Size = new System.Drawing.Size(105, 17);
+      this.shutdownRadioButton.TabIndex = 1;
+      this.shutdownRadioButton.TabStop = true;
+      this.shutdownRadioButton.Tag = "Shutdown";
+      this.shutdownRadioButton.Text = "Shutdown Signal";
+      this.shutdownRadioButton.UseVisualStyleBackColor = true;
+      this.shutdownRadioButton.CheckedChanged += new System.EventHandler(this.shutdownRadioButton_CheckedChanged);
+      // 
+      // panel1
+      // 
+      this.panel1.Controls.Add(this.shutdownRadioButton);
+      this.panel1.Controls.Add(this.OfflineRadioButton);
+      this.panel1.Location = new System.Drawing.Point(3, 3);
+      this.panel1.Name = "panel1";
+      this.panel1.Size = new System.Drawing.Size(114, 51);
+      this.panel1.TabIndex = 2;
+      // 
+      // AppointmentTypeView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.panel1);
+      this.Name = "AppointmentTypeView";
+      this.Size = new System.Drawing.Size(120, 57);
+      this.panel1.ResumeLayout(false);
+      this.panel1.PerformLayout();
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.RadioButton OfflineRadioButton;
+    private System.Windows.Forms.RadioButton shutdownRadioButton;
+    private System.Windows.Forms.Panel panel1;
+  }
+}
Index: /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeView.cs	(revision 9016)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/DowntimeTypeView.cs	(revision 9016)
@@ -0,0 +1,42 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Windows.Forms;
+
+namespace HeuristicLab.Clients.Hive.Administrator.Views {
+  public partial class DowntimeTypeView : UserControl {
+    public DowntimeType DowntimeType { get; set; }
+
+    public DowntimeTypeView() {
+      InitializeComponent();
+      DowntimeType = DowntimeType.Offline;
+    }
+
+    private void OfflineRadioButton_CheckedChanged(object sender, EventArgs e) {
+      DowntimeType = DowntimeType.Offline;
+    }
+
+    private void shutdownRadioButton_CheckedChanged(object sender, EventArgs e) {
+      DowntimeType = DowntimeType.Shutdown;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/Recurrence.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/Recurrence.Designer.cs	(revision 9015)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/Recurrence.Designer.cs	(revision 9016)
@@ -63,5 +63,5 @@
       this.cbTuesday = new System.Windows.Forms.CheckBox();
       this.cbMonday = new System.Windows.Forms.CheckBox();
-      this.appointmentTypeView = new HeuristicLab.Clients.Hive.Administrator.Views.AppointmentTypeView();
+      this.appointmentTypeView = new HeuristicLab.Clients.Hive.Administrator.Views.DowntimeTypeView();
       this.gbDowntimeType = new System.Windows.Forms.GroupBox();
       this.gbAppointment.SuspendLayout();
@@ -258,5 +258,5 @@
       // appointmentTypeView
       // 
-      this.appointmentTypeView.AppointmentType = HeuristicLab.Clients.Hive.DowntimeType.Offline;
+      this.appointmentTypeView.DowntimeType = HeuristicLab.Clients.Hive.DowntimeType.Offline;
       this.appointmentTypeView.Location = new System.Drawing.Point(10, 19);
       this.appointmentTypeView.Name = "appointmentTypeView";
@@ -318,5 +318,5 @@
     private System.Windows.Forms.CheckBox cbTuesday;
     private System.Windows.Forms.CheckBox cbMonday;
-    private AppointmentTypeView appointmentTypeView;
+    private DowntimeTypeView appointmentTypeView;
     private System.Windows.Forms.GroupBox gbDowntimeType;
   }
Index: /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/Recurrence.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/Recurrence.cs	(revision 9015)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/Recurrence.cs	(revision 9016)
@@ -54,5 +54,5 @@
           AllDay = chbade.Checked,
           WeekDays = days,
-          AppointmentType = appointmentTypeView.AppointmentType
+          DowntimeType = appointmentTypeView.DowntimeType
         };
 
Index: /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.Designer.cs	(revision 9015)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.Designer.cs	(revision 9016)
@@ -71,6 +71,6 @@
       this.dvOnline.ActiveTool = drawTool1;
       this.dvOnline.AmPmDisplay = false;
-      this.dvOnline.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.dvOnline.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.dvOnline.AppointmentDuration = Calendar.AppointmentSlotDuration.SixtyMinutes;
@@ -212,6 +212,6 @@
       this.btCreate.Size = new System.Drawing.Size(242, 26);
       this.btCreate.TabIndex = 20;
-      this.btCreate.Text = "Create Appointment";
-      this.toolTip.SetToolTip(this.btCreate, "Create a new appointment in the calender");
+      this.btCreate.Text = "Create Downtime";
+      this.toolTip.SetToolTip(this.btCreate, "Create a new downtime in the calender");
       this.btCreate.UseVisualStyleBackColor = true;
       this.btCreate.Click += new System.EventHandler(this.btCreate_Click);
@@ -247,5 +247,5 @@
       // mcOnline
       // 
-      this.mcOnline.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.mcOnline.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.mcOnline.CalendarDimensions = new System.Drawing.Size(2, 1);
Index: /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.cs	(revision 9015)
+++ /trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.cs	(revision 9016)
@@ -25,5 +25,4 @@
 using System.Linq;
 using System.Windows.Forms;
-using System.Xml.Serialization;
 using Calendar;
 using HeuristicLab.Core;
@@ -40,7 +39,5 @@
     }
 
-    [XmlArray("Appointments")]
-    [XmlArrayItem("HiveAppointment", typeof(HiveAppointment))]
-    public List<HiveAppointment> offlineTimes = new List<HiveAppointment>();
+    public List<HiveDowntime> offlineTimes = new List<HiveDowntime>();
 
     //delegate fired, if a dialog is being closed
@@ -59,7 +56,7 @@
 
     private void dvOnline_OnResolveAppointments(object sender, ResolveAppointmentsEventArgs e) {
-      List<HiveAppointment> apps = new List<HiveAppointment>();
-
-      foreach (HiveAppointment app in offlineTimes) {
+      List<HiveDowntime> apps = new List<HiveDowntime>();
+
+      foreach (HiveDowntime app in offlineTimes) {
         if (app.StartDate >= e.StartDate && app.StartDate <= e.EndDate && !app.Deleted) {
           apps.Add(app);
@@ -68,5 +65,5 @@
 
       e.Appointments.Clear();
-      foreach (HiveAppointment app in apps) {
+      foreach (HiveDowntime app in apps) {
         e.Appointments.Add(app);
       }
@@ -74,9 +71,9 @@
 
     private void dvOnline_OnNewAppointment(object sender, NewAppointmentEventArgs e) {
-      HiveAppointment Appointment = new HiveAppointment();
-
-      Appointment.StartDate = e.StartDate;
-      Appointment.EndDate = e.EndDate;
-      offlineTimes.Add(Appointment);
+      HiveDowntime downtime = new HiveDowntime();
+
+      downtime.StartDate = e.StartDate;
+      downtime.EndDate = e.EndDate;
+      offlineTimes.Add(downtime);
     }
 
@@ -84,12 +81,12 @@
       offlineTimes.Clear();
       if (Content != null) {
-        foreach (Downtime app in Content) {
-          offlineTimes.Add(ToHiveAppointment(app));
-        }
-      }
-      dvOnline.Invalidate();
-    }
-
-    private bool CreateAppointment(DowntimeType dtType) {
+        foreach (Downtime downtime in Content) {
+          offlineTimes.Add(ToHiveDowntime(downtime));
+        }
+      }
+      dvOnline.Invalidate();
+    }
+
+    private bool CreateDowntime(DowntimeType dtType) {
       DateTime from, to;
 
@@ -98,5 +95,5 @@
           //whole day appointment, only dates are visible
           if (DateTime.TryParse(dtpFrom.Text, out from) && DateTime.TryParse(dtpTo.Text, out to) && from <= to)
-            offlineTimes.Add(CreateAppointment(from, to.AddDays(1), true, dtType));
+            offlineTimes.Add(CreateDowntime(from, to.AddDays(1), true, dtType));
           else
             MessageBox.Show("Incorrect date format", "Schedule Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
@@ -105,12 +102,12 @@
           if (DateTime.TryParse(dtpFrom.Text + " " + txttimeFrom.Text, out from) && DateTime.TryParse(dtpTo.Text + " " + txttimeTo.Text, out to) && from < to) {
             if (from.Date == to.Date)
-              offlineTimes.Add(CreateAppointment(from, to, false, dtType));
+              offlineTimes.Add(CreateDowntime(from, to, false, dtType));
             else {
               //more than 1 day selected
               while (from.Date != to.Date) {
-                offlineTimes.Add(CreateAppointment(from, new DateTime(from.Year, from.Month, from.Day, to.Hour, to.Minute, 0, 0), false, dtType));
+                offlineTimes.Add(CreateDowntime(from, new DateTime(from.Year, from.Month, from.Day, to.Hour, to.Minute, 0, 0), false, dtType));
                 from = from.AddDays(1);
               }
-              offlineTimes.Add(CreateAppointment(from, new DateTime(from.Year, from.Month, from.Day, to.Hour, to.Minute, 0, 0), false, dtType));
+              offlineTimes.Add(CreateDowntime(from, new DateTime(from.Year, from.Month, from.Day, to.Hour, to.Minute, 0, 0), false, dtType));
             }
           } else
@@ -120,55 +117,55 @@
         return true;
       } else {
-        MessageBox.Show("Error in create appointment, please fill out all textboxes!", "Schedule Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+        MessageBox.Show("Error creating downtime, please fill out all textboxes!", "Schedule Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return false;
       }
     }
 
-    private HiveAppointment CreateAppointment(DateTime startDate, DateTime endDate, bool allDay, DowntimeType downtimeType) {
-      HiveAppointment app = new HiveAppointment();
-      app.StartDate = startDate;
-      app.EndDate = endDate;
-      app.AllDayEvent = allDay;
-      app.BorderColor = Color.Red;
-      app.Locked = true;
-      app.Subject = downtimeType.ToString();
-      app.Recurring = false;
-      return app;
-    }
-
-    private HiveAppointment CreateAppointment(DateTime startDate, DateTime endDate, bool allDay, bool recurring, Guid recurringId, DowntimeType downtimeType) {
-      HiveAppointment app = new HiveAppointment();
-      app.StartDate = startDate;
-      app.EndDate = endDate;
-      app.AllDayEvent = allDay;
-      app.BorderColor = Color.Red;
-      app.Locked = true;
-      app.Subject = downtimeType.ToString();
-      app.Recurring = recurring;
-      app.RecurringId = recurringId;
-      return app;
-    }
-
-    private void DeleteRecurringAppointment(Guid recurringId) {
-      foreach (HiveAppointment app in offlineTimes) {
-        if (app.RecurringId == recurringId) {
-          app.Deleted = true;
-        }
-      }
-    }
-
-    private void ChangeRecurrenceAppointment(Guid recurringId) {
+    private HiveDowntime CreateDowntime(DateTime startDate, DateTime endDate, bool allDay, DowntimeType downtimeType) {
+      HiveDowntime downtime = new HiveDowntime();
+      downtime.StartDate = startDate;
+      downtime.EndDate = endDate;
+      downtime.AllDayEvent = allDay;
+      downtime.BorderColor = Color.Red;
+      downtime.Locked = true;
+      downtime.Subject = downtimeType.ToString();
+      downtime.Recurring = false;
+      return downtime;
+    }
+
+    private HiveDowntime CreateDowntime(DateTime startDate, DateTime endDate, bool allDay, bool recurring, Guid recurringId, DowntimeType downtimeType) {
+      HiveDowntime downtime = new HiveDowntime();
+      downtime.StartDate = startDate;
+      downtime.EndDate = endDate;
+      downtime.AllDayEvent = allDay;
+      downtime.BorderColor = Color.Red;
+      downtime.Locked = true;
+      downtime.Subject = downtimeType.ToString();
+      downtime.Recurring = recurring;
+      downtime.RecurringId = recurringId;
+      return downtime;
+    }
+
+    private void DeleteRecurringDowntime(Guid recurringId) {
+      foreach (HiveDowntime downtime in offlineTimes) {
+        if (downtime.RecurringId == recurringId) {
+          downtime.Deleted = true;
+        }
+      }
+    }
+
+    private void ChangeRecurrenceDowntime(Guid recurringId) {
       int hourfrom = int.Parse(txttimeFrom.Text.Substring(0, txttimeFrom.Text.IndexOf(':')));
       int hourTo = int.Parse(txttimeTo.Text.Substring(0, txttimeTo.Text.IndexOf(':')));
-      List<HiveAppointment> recurringAppointments = offlineTimes.Where(appointment => ((HiveAppointment)appointment).RecurringId == recurringId).ToList();
-      recurringAppointments.ForEach(appointment => appointment.StartDate = new DateTime(appointment.StartDate.Year, appointment.StartDate.Month, appointment.StartDate.Day, hourfrom, 0, 0));
-      recurringAppointments.ForEach(appointment => appointment.EndDate = new DateTime(appointment.EndDate.Year, appointment.EndDate.Month, appointment.EndDate.Day, hourTo, 0, 0));
+      List<HiveDowntime> recurringDowntimes = offlineTimes.Where(appointment => ((HiveDowntime)appointment).RecurringId == recurringId).ToList();
+      recurringDowntimes.ForEach(appointment => appointment.StartDate = new DateTime(appointment.StartDate.Year, appointment.StartDate.Month, appointment.StartDate.Day, hourfrom, 0, 0));
+      recurringDowntimes.ForEach(appointment => appointment.EndDate = new DateTime(appointment.EndDate.Year, appointment.EndDate.Month, appointment.EndDate.Day, hourTo, 0, 0));
     }
 
     public void DialogClosed(RecurrentEvent e) {
-      CreateDailyRecurrenceAppointments(e.DateFrom, e.DateTo, e.AllDay, e.WeekDays, e.AppointmentType);
-    }
-
-    private void CreateDailyRecurrenceAppointments(DateTime dateFrom, DateTime dateTo, bool allDay, HashSet<DayOfWeek> daysOfWeek, DowntimeType appointmentType) {
+      CreateDailyRecurrenceDowntimes(e.DateFrom, e.DateTo, e.AllDay, e.WeekDays, e.DowntimeType);
+    }
+
+    private void CreateDailyRecurrenceDowntimes(DateTime dateFrom, DateTime dateTo, bool allDay, HashSet<DayOfWeek> daysOfWeek, DowntimeType appointmentType) {
       DateTime incDate = dateFrom;
       Guid guid = Guid.NewGuid();
@@ -176,5 +173,5 @@
       while (incDate.Date <= dateTo.Date) {
         if (daysOfWeek.Contains(incDate.Date.DayOfWeek))
-          offlineTimes.Add(CreateAppointment(incDate, new DateTime(incDate.Year, incDate.Month, incDate.Day, dateTo.Hour, dateTo.Minute, 0), allDay, true, guid, appointmentType));
+          offlineTimes.Add(CreateDowntime(incDate, new DateTime(incDate.Year, incDate.Month, incDate.Day, dateTo.Hour, dateTo.Minute, 0), allDay, true, guid, appointmentType));
         incDate = incDate.AddDays(1);
       }
@@ -184,23 +181,23 @@
 
     private void btbDelete_Click(object sender, EventArgs e) {
-      HiveAppointment selectedAppointment = (HiveAppointment)dvOnline.SelectedAppointment;
+      HiveDowntime selectedDowntime = (HiveDowntime)dvOnline.SelectedAppointment;
       if (dvOnline.SelectedAppointment != null) {
-        if (!selectedAppointment.Recurring)
-          DeleteAppointment();
+        if (!selectedDowntime.Recurring)
+          DeleteDowntime();
         else {
           DialogResult res = MessageBox.Show("Delete all events in this series?", "Delete recurrences", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
           if (res != DialogResult.Yes)
-            DeleteAppointment();
+            DeleteDowntime();
           else
-            DeleteRecurringAppointment(selectedAppointment.RecurringId);
-        }
-      }
-      dvOnline.Invalidate();
-    }
-
-    private void DeleteAppointment() {
+            DeleteRecurringDowntime(selectedDowntime.RecurringId);
+        }
+      }
+      dvOnline.Invalidate();
+    }
+
+    private void DeleteDowntime() {
       try {
-        HiveAppointment app = offlineTimes.First(s => s.Equals((HiveAppointment)dvOnline.SelectedAppointment));
-        app.Deleted = true;
+        HiveDowntime downtime = offlineTimes.First(s => s.Equals((HiveDowntime)dvOnline.SelectedAppointment));
+        downtime.Deleted = true;
       }
       catch (InvalidOperationException) {
@@ -239,5 +236,5 @@
 
     private void btnClearCal_Click(object sender, System.EventArgs e) {
-      foreach (HiveAppointment app in offlineTimes) {
+      foreach (HiveDowntime app in offlineTimes) {
         app.Deleted = true;
       }
@@ -256,5 +253,5 @@
         txttimeFrom.Text = dvOnline.SelectionStart.ToShortTimeString();
         txttimeTo.Text = dvOnline.SelectionEnd.ToShortTimeString();
-        btCreate.Text = "Create Appointment";
+        btCreate.Text = "Create Downtime";
       }
 
@@ -271,5 +268,5 @@
       if (dvOnline.Selection == SelectionType.None) {
         //also change the caption of the save button
-        btCreate.Text = "Create Appointment";
+        btCreate.Text = "Create Downtime";
       }
     }
@@ -283,15 +280,15 @@
         DowntimeType dtType;
         DialogResult result;
-        AppointmentTypeDialog dialog = new AppointmentTypeDialog();
+        DowntimeTypeDialog dialog = new DowntimeTypeDialog();
         result = dialog.ShowDialog(this);
         dtType = dialog.AppointmentType;
         dialog.Dispose();
         if (result == DialogResult.Cancel) return;
-        CreateAppointment(dtType);
+        CreateDowntime(dtType);
       } else {
         //now we want to change an existing appointment
         if (!dvOnline.SelectedAppointment.Recurring) {
-          if (CreateAppointment(GetDowntimeTypeOfSelectedAppointment()))
-            DeleteAppointment();
+          if (CreateDowntime(GetDowntimeTypeOfSelectedDowntime()))
+            DeleteDowntime();
         } else {
           //change recurring appointment
@@ -299,8 +296,8 @@
           DialogResult res = MessageBox.Show("Change all events in this series?", "Change recurrences", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
           if (res != DialogResult.Yes) {
-            if (CreateAppointment(GetDowntimeTypeOfSelectedAppointment()))
-              DeleteAppointment();
+            if (CreateDowntime(GetDowntimeTypeOfSelectedDowntime()))
+              DeleteDowntime();
           } else
-            ChangeRecurrenceAppointment(((HiveAppointment)dvOnline.SelectedAppointment).RecurringId);
+            ChangeRecurrenceDowntime(((HiveDowntime)dvOnline.SelectedAppointment).RecurringId);
         }
       }
@@ -316,16 +313,16 @@
     private void btnSaveCal_Click(object sender, EventArgs e) {
       if (HiveAdminClient.Instance.DowntimeForResourceId == null || HiveAdminClient.Instance.DowntimeForResourceId == Guid.Empty) {
-        MessageBox.Show("You have to save the goup before you can save the schedule. ", "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Stop);
+        MessageBox.Show("You have to save the group before you can save the schedule. ", "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Stop);
       } else {
-        List<Downtime> appointments = new List<Downtime>();
-        foreach (HiveAppointment app in offlineTimes) {
-          if (app.Deleted && app.Id != Guid.Empty) {
-            HiveAdminClient.Delete(ToDowntime(app));
-          } else if (app.Changed || app.Id == null || app.Id == Guid.Empty) {
-            Downtime dt = ToDowntime(app);
-            appointments.Add(dt);
+        List<Downtime> downtimes = new List<Downtime>();
+        foreach (HiveDowntime downtime in offlineTimes) {
+          if (downtime.Deleted && downtime.Id != Guid.Empty) {
+            HiveAdminClient.Delete(ToDowntime(downtime));
+          } else if (downtime.Changed || downtime.Id == null || downtime.Id == Guid.Empty) {
+            Downtime dt = ToDowntime(downtime);
+            downtimes.Add(dt);
           }
         }
-        foreach (Downtime dt in appointments) {
+        foreach (Downtime dt in downtimes) {
           dt.Store();
         }
@@ -333,6 +330,6 @@
     }
 
-    private HiveAppointment ToHiveAppointment(Downtime downtime) {
-      HiveAppointment app = new HiveAppointment {
+    private HiveDowntime ToHiveDowntime(Downtime downtime) {
+      HiveDowntime app = new HiveDowntime {
         AllDayEvent = downtime.AllDayEvent,
         EndDate = downtime.EndDate,
@@ -350,5 +347,5 @@
     }
 
-    private Downtime ToDowntime(HiveAppointment app) {
+    private Downtime ToDowntime(HiveDowntime app) {
       Downtime downtime = new Downtime {
         AllDayEvent = app.AllDayEvent,
@@ -364,6 +361,6 @@
     }
 
-    private DowntimeType GetDowntimeTypeOfSelectedAppointment() {
-      return (DowntimeType)Enum.Parse(typeof(DowntimeType), ((HiveAppointment)dvOnline.SelectedAppointment).Subject);
+    private DowntimeType GetDowntimeTypeOfSelectedDowntime() {
+      return (DowntimeType)Enum.Parse(typeof(DowntimeType), ((HiveDowntime)dvOnline.SelectedAppointment).Subject);
     }
   }
