Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/Appointment.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/Appointment.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/Appointment.cs	(revision 4105)
@@ -0,0 +1,253 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
+using System.Diagnostics;
+using System.Data;
+using System.Xml.Serialization;
+
+namespace HeuristicLab.Calendar
+{
+	public class Appointment : iAppointment
+    {
+
+		#region " Private Fields "
+		private int layer;
+		private string group;
+		private DateTime startDate;
+		private DateTime endDate;
+		private bool locked;
+		private Color color = Color.White;
+		private Color textColor = Color.Black;
+		private int appointmentId = 0;
+		private Color borderColor = Color.Blue;
+		private bool drawBorder = false;
+		private string subject = string.Empty;
+		private bool allDayEvent = false;
+		private bool reccuringEvent = false;
+    private Guid reccuringID = Guid.Empty;
+		internal int conflictCount;
+		#endregion
+
+
+        public Appointment()
+        {
+			color = Color.White;
+			borderColor = Color.Blue;
+			Subject = "New Appointment";
+		}
+
+		#region " Public Properties "
+        [XmlIgnore]
+		public int Layer
+        {
+            get { return layer; }
+            set { layer = value; }
+        }
+
+        [XmlIgnore]
+        public string Group
+        {
+            get { return group; }
+            set { group = value; }
+        }
+
+        [XmlAttribute("Locked")]
+        [System.ComponentModel.DefaultValue(false)]
+        public bool Locked
+        {
+            get
+            {
+                return locked;
+            }
+            set
+            {
+                locked = value;
+                OnLockedChanged();
+            }
+        }
+
+        [XmlIgnore]
+        public Color Color
+		{
+			get
+			{
+				return color;
+			}
+			set
+			{
+				color = value;
+				OnColorChanged();
+			}
+		}
+
+        [XmlIgnore]
+        public Color TextColor
+        {
+            get
+            {
+                return textColor;
+            }
+            set
+            {
+                textColor = value;
+                OnTextColorChanged();
+            }
+        }
+
+        [XmlIgnore]
+		public Color BorderColor
+		{
+			get
+			{
+				return borderColor;
+			}
+			set
+			{
+				borderColor = value;
+				OnBorderColorChanged();
+			}
+		}
+
+        [XmlIgnore]
+		public bool DrawBorder
+        {
+            get
+            {
+                return drawBorder;
+            }
+            set
+            {
+                drawBorder = value;
+            }
+        }
+
+        [XmlAttribute("AllDayEvent")]
+        public bool AllDayEvent
+        {
+            get
+            {
+                return allDayEvent;
+            }
+            set
+            {
+                allDayEvent = value;
+                OnAllDayEventChanged();
+            }
+        }
+
+        [XmlAttribute("Recurring")]
+		public bool Recurring
+		{
+			get
+			{
+				return reccuringEvent;
+			}
+			set
+			{
+				reccuringEvent = value;
+			}
+		}
+        [XmlAttribute("RecurringId")]
+    public Guid RecurringId {
+      get {
+        return reccuringID;
+      }
+      set {
+        reccuringID = value;
+      }
+    }
+		#endregion
+
+		#region " Events "
+		protected virtual void OnStartDateChanged()
+		{
+		}
+		protected virtual void OnEndDateChanged()
+		{
+		}
+		protected virtual void OnLockedChanged()
+		{
+		}
+		protected virtual void OnColorChanged()
+		{
+		}
+		protected virtual void OnTextColorChanged()
+		{
+		}
+		protected virtual void OnBorderColorChanged()
+		{
+		}
+		protected virtual void OnTitleChanged()
+		{
+		}
+		protected virtual void OnAllDayEventChanged()
+		{
+		}
+		#endregion
+
+		#region iAppointment Members
+        [XmlAttribute("StartDate")]
+		public DateTime StartDate
+		{
+			get
+			{
+				return startDate;
+			}
+			set
+			{
+				startDate = value;
+				OnStartDateChanged();
+
+			}
+		}
+
+        [XmlAttribute("EndDate")]
+		public DateTime EndDate
+		{
+			get
+			{
+				return endDate;
+			}
+			set
+			{
+				endDate = value;
+				OnEndDateChanged();
+			}
+		}
+
+        [XmlIgnore]
+		public int AppointmentId
+		{
+			get
+			{
+				return appointmentId;
+			}
+			set
+			{
+				appointmentId = value;
+			}
+		}
+        [XmlElement("Subject")]
+		public string Subject
+		{
+			get
+			{
+				return subject;
+			}
+			set
+			{
+				subject = value;
+			}
+		}
+
+        [XmlIgnore]
+		public string Location { get; set; }
+
+        [XmlIgnore]
+		public string Note { get; set; }
+		#endregion
+	}
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentEventArgs.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentEventArgs.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentEventArgs.cs	(revision 4105)
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeuristicLab.Calendar
+{
+    public class AppointmentEventArgs : EventArgs
+    {
+        public AppointmentEventArgs( Appointment appointment )
+        {
+            m_Appointment = appointment;
+        }
+
+        private Appointment m_Appointment;
+
+        public Appointment Appointment
+        {
+            get { return m_Appointment; }
+        }
+    }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentHieghtDrawMode.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentHieghtDrawMode.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentHieghtDrawMode.cs	(revision 4105)
@@ -0,0 +1,15 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeuristicLab.Calendar
+{
+	public enum AppHeightDrawMode
+	{
+		TrueHeightAll = 0, // all appointments have height proportional to true length
+		FullHalfHourBlocksAll = 1, // all appts drawn in half hour blocks
+		EndHalfHourBlocksAll = 2, // all appts boxes start at actual time, end in half hour blocks
+		FullHalfHourBlocksShort = 3, // short (< 30 mins) appts drawn in half hour blocks
+		EndHalfHourBlocksShort = 4, // short appts boxes start at actual time, end in half hour blocks
+	}
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentSlot.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentSlot.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentSlot.cs	(revision 4105)
@@ -0,0 +1,10 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeuristicLab.Calendar
+{
+	public class AppointmentSlot
+	{
+	}
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentSlotDuration.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentSlotDuration.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/AppointmentSlotDuration.cs	(revision 4105)
@@ -0,0 +1,16 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeuristicLab.Calendar
+{
+	public enum AppointmentSlotDuration
+	{
+		SixtyMinutes = 1,
+		ThirtyMinutes = 2,
+		TwentyMinutes = 3,
+		FifteenMinutes = 4,
+		TenMinutes = 6,
+		FiveMinutes = 12,	
+	}
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/NewAppointmentEvent.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/NewAppointmentEvent.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/NewAppointmentEvent.cs	(revision 4105)
@@ -0,0 +1,39 @@
+
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeuristicLab.Calendar
+{
+    public class NewAppointmentEventArgs : EventArgs
+    {
+        public NewAppointmentEventArgs( string title, DateTime start, DateTime end )
+        {
+            m_Title = title;
+            m_StartDate = start;
+            m_EndDate = end;
+        }
+
+        private string m_Title;
+
+        public string Title
+        {
+            get { return m_Title; }
+        }
+
+        private DateTime m_StartDate;
+
+        public DateTime StartDate
+        {
+            get { return m_StartDate; }
+        }
+
+        private DateTime m_EndDate;
+
+        public DateTime EndDate
+        {
+            get { return m_EndDate; }
+        }
+    }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/ResolveAppointmentsEvent.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/ResolveAppointmentsEvent.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/ResolveAppointmentsEvent.cs	(revision 4105)
@@ -0,0 +1,42 @@
+
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeuristicLab.Calendar
+{
+    public class ResolveAppointmentsEventArgs : EventArgs
+    {
+        public ResolveAppointmentsEventArgs(DateTime start, DateTime end)
+        {
+            m_StartDate = start;
+            m_EndDate = end;
+            m_Appointments = new List<Appointment>();
+        }
+
+        private DateTime m_StartDate;
+
+        public DateTime StartDate
+        {
+            get { return m_StartDate; }
+            set { m_StartDate = value; }
+        }
+
+        private DateTime m_EndDate;
+
+        public DateTime EndDate
+        {
+            get { return m_EndDate; }
+            set { m_EndDate = value; }
+        }
+
+        private List<Appointment> m_Appointments;
+
+        public List<Appointment> Appointments
+        {
+            get { return m_Appointments; }
+            set { m_Appointments = value; }
+        }
+    }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/iAppointment.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/iAppointment.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Appointment/iAppointment.cs	(revision 4105)
@@ -0,0 +1,16 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeuristicLab.Calendar
+{
+	interface iAppointment
+	{
+		int AppointmentId { get; set; }
+		DateTime StartDate { get; set; }
+		DateTime EndDate { get; set; }
+		string Subject { get; set; }
+		string Location { get; set; }
+		string Note { get; set; }
+	}
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/CalendarPlugin.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/CalendarPlugin.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/CalendarPlugin.cs	(revision 4105)
@@ -0,0 +1,30 @@
+#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 HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Calendar {
+  [Plugin("HeuristicLab.Calendar-3.3")]
+  [PluginFile("HeuristicLab.Calendar-3.3.dll", PluginFileType.Assembly)]
+  public class CalendarPlugin : PluginBase {
+  }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/CalendarStorage/iCalendarStorage.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/CalendarStorage/iCalendarStorage.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/CalendarStorage/iCalendarStorage.cs	(revision 4105)
@@ -0,0 +1,9 @@
+﻿using System;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Calendar.DataStorage
+{
+	public interface iCalendarStorage
+	{
+	}
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/DayView.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/DayView.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/DayView.cs	(revision 4105)
@@ -0,0 +1,1632 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using System.Drawing;
+using System.ComponentModel;
+using System.Drawing.Drawing2D;
+
+namespace HeuristicLab.Calendar
+{
+    public class DayView : Control
+    {
+        public DayView()
+        {
+            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+            SetStyle(ControlStyles.ResizeRedraw, true);
+            SetStyle(ControlStyles.Selectable, true);
+			SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+			SetStyle(ControlStyles.UserPaint, true);
+
+            scrollbar = new VScrollBar();
+            scrollbar.SmallChange = appointmentSlotHeight;
+            scrollbar.LargeChange = appointmentSlotHeight * 2;
+            scrollbar.Dock = DockStyle.Right;
+            scrollbar.Visible = allowScroll;
+            scrollbar.Scroll += new ScrollEventHandler(scrollbar_Scroll);
+            AdjustScrollbar();
+            scrollbar.Value = (startHour * 2 * appointmentSlotHeight);
+
+            this.Controls.Add(scrollbar);
+
+            editbox = new TextBox();
+            editbox.Multiline = true;
+            editbox.Visible = false;
+            editbox.BorderStyle = BorderStyle.None;
+            editbox.KeyUp += new KeyEventHandler(editbox_KeyUp);
+            editbox.Margin = Padding.Empty;
+
+            this.Controls.Add(editbox);
+
+            drawTool = new DrawTool();
+            drawTool.DayView = this;
+
+            selectionTool = new SelectionTool();
+            selectionTool.DayView = this;
+            selectionTool.Complete += new EventHandler(selectionTool_Complete);
+
+            activeTool = drawTool;
+
+            UpdateWorkingHours();
+
+            this.Renderer = new Office12Renderer();
+        }
+
+		#region " Private Fields "
+		private TextBox editbox;
+		private VScrollBar scrollbar;
+		private DrawTool drawTool;
+		private SelectionTool selectionTool;
+		private int allDayEventsHeaderHeight = 20;
+
+		private DateTime workStart;
+		private DateTime workEnd;
+
+		private int hourLabelWidth = 50;
+		private int hourLabelIndent = 2;
+		private int dayHeadersHeight = 20;
+		private int appointmentGripWidth = 5;
+		private int dayGripWidth = 5;
+		private int horizontalAppointmentHeight = 20;
+
+		private AppHeightDrawMode appHeightMode = AppHeightDrawMode.TrueHeightAll;
+		private int appointmentSlotHeight = 24;
+		private AbstractRenderer renderer;
+		private bool ampmdisplay = false;
+		private bool drawAllAppBorder = false;
+		private bool minHalfHourApp = false;
+		private int daysToShow = 1;
+		private SelectionType selection;
+		private DateTime startDate;
+		private int startHour = 8;
+		private Appointment selectedAppointment;
+		private DateTime selectionStart;
+		private DateTime selectionEnd;
+		private ITool activeTool;
+		private int workingHourStart = 8;
+		private int workingMinuteStart = 30;
+		private int workingHourEnd = 18;
+		private int workingMinuteEnd = 30;
+		private bool selectedAppointmentIsNew;
+		private bool allowScroll = true;
+		private bool allowInplaceEditing = true;
+		private bool allowNew = true;
+		private bool enableShadows = true;
+		private bool enableRoundCorners = false;
+		private bool enableTimeIndicator = false;
+		private bool enableDurationDisplay = false;
+		private AppointmentSlotDuration appointmentSlotDuration = AppointmentSlotDuration.ThirtyMinutes;
+
+		internal System.Collections.Hashtable cachedAppointments = new System.Collections.Hashtable();
+		internal Dictionary<Appointment, AppointmentView> appointmentViews = new Dictionary<Appointment, AppointmentView>();
+		internal Dictionary<Appointment, AppointmentView> longappointmentViews = new Dictionary<Appointment, AppointmentView>();
+		#endregion
+
+		#region Properties
+		[Category("DailyView")]
+		[System.ComponentModel.DefaultValue(5)]
+		public int DayGripWidth
+		{
+			get
+			{
+				return dayGripWidth;
+			}
+			set
+			{
+				if (dayGripWidth == value)
+					return;
+
+				dayGripWidth = value;
+				this.Invalidate();
+			}
+		}
+
+		[Category("DailyView")]
+		[System.ComponentModel.DefaultValue(20)]
+		public int DayHeadersHeight
+		{
+			get
+			{
+				return dayHeadersHeight;
+			}
+			set
+			{
+				if (dayHeadersHeight == value)
+					return;
+
+				dayHeadersHeight = value;
+				this.Invalidate();
+			}
+		}
+		
+		[Category("DailyView")]
+		public bool AmPmDisplay
+        {
+            get
+            {
+                return ampmdisplay;
+            }
+            set
+            {
+				if (ampmdisplay == value)
+					return;
+                ampmdisplay = value;
+                this.Invalidate();
+            }
+        }
+
+		[Category("DailyView")]
+		public bool MinHalfHourApp
+        {
+            get
+            {
+                return minHalfHourApp;
+            }
+            set
+            {
+				if (minHalfHourApp == value)
+					return;
+
+                minHalfHourApp = value;
+                this.Invalidate();
+            }
+        }
+
+		[Category("DailyView")]
+        [System.ComponentModel.DefaultValue(1)]
+        public int DaysToShow
+        {
+            get
+            {
+                return daysToShow;
+            }
+            set
+            {
+				if (daysToShow == value)
+					return;
+                daysToShow = value;
+				
+				if (this.CurrentlyEditing)
+					FinishEditing(true);
+
+				this.Invalidate();
+            }
+        }
+
+		[Category("DailyView")]
+        public DateTime StartDate
+        {
+            get
+            {
+                return startDate;
+            }
+            set
+            {
+				if (startDate == value)
+					return;
+                startDate = value;
+
+				startDate = startDate.Date;
+
+				selectedAppointment = null;
+				selectedAppointmentIsNew = false;
+				selection = SelectionType.DateRange;
+
+				this.Invalidate();
+            }
+        }
+
+		[Category("DailyView")]
+        [System.ComponentModel.DefaultValue(8)]
+        public int StartHour
+        {
+            get
+            {
+                return startHour;
+            }
+            set
+            {
+                startHour = value;
+                OnStartHourChanged();
+            }
+        }
+
+		[Category("DailyView")]
+        [System.ComponentModel.DefaultValue(8)]
+        public int WorkingHourStart
+        {
+            get
+            {
+                return workingHourStart;
+            }
+            set
+            {
+                workingHourStart = value;
+                UpdateWorkingHours();
+            }
+        }
+
+		[Category("DailyView")]
+        [System.ComponentModel.DefaultValue(30)]
+        public int WorkingMinuteStart
+        {
+            get
+            {
+                return workingMinuteStart;
+            }
+            set
+            {
+                workingMinuteStart = value;
+                UpdateWorkingHours();
+            }
+        }
+
+		[Category("DailyView")]
+        [System.ComponentModel.DefaultValue(18)]
+        public int WorkingHourEnd
+        {
+            get
+            {
+                return workingHourEnd;
+            }
+            set
+            {
+                workingHourEnd = value;
+                UpdateWorkingHours();
+            }
+        }
+
+		[Category("DailyView")]
+        [System.ComponentModel.DefaultValue(30)]
+        public int WorkingMinuteEnd
+        {
+            get { return workingMinuteEnd; }
+            set
+            {
+                workingMinuteEnd = value;
+                UpdateWorkingHours();
+            }
+        }
+
+		[Category("DailyView")]
+        [DefaultValue(true)]
+        public bool AllowScroll
+        {
+            get
+            {
+                return allowScroll;
+            }
+            set
+            {
+				if (allowScroll == value)
+					return;
+
+                allowScroll = value;
+
+				this.scrollbar.Visible = this.AllowScroll;
+				this.Invalidate();
+            }
+        }
+
+		[Category("DailyView")]
+        [DefaultValue(true)]
+        public bool AllowInplaceEditing
+        {
+            get
+            {
+                return allowInplaceEditing;
+            }
+            set
+            {
+                allowInplaceEditing = value;
+            }
+        }
+
+		[Category("DailyView.Appointment")]
+		[System.ComponentModel.DefaultValue(24)]
+		public int AppointmentSlotHeight
+		{
+			get
+			{
+				return appointmentSlotHeight;
+			}
+			set
+			{
+				if (appointmentSlotHeight == value)
+					return;
+
+				appointmentSlotHeight = value;
+				AdjustScrollbar();
+				this.Invalidate();
+			}
+		}
+
+		[Category("DailyView.Appointment")]
+		[System.ComponentModel.DefaultValue(5)]
+		public int AppointmentGripWidth
+		{
+			get
+			{
+				return appointmentGripWidth;
+			}
+			set
+			{
+				if (appointmentGripWidth == value)
+					return;
+
+				appointmentGripWidth = value;
+				this.Invalidate();
+			}
+		}
+
+		[Category("DailyView.Appointment")]
+		public bool DrawAllAppBorder
+		{
+			get
+			{
+				return drawAllAppBorder;
+			}
+			set
+			{
+				if (drawAllAppBorder == value)
+					return;
+				drawAllAppBorder = value;
+				this.Invalidate();
+			}
+		}
+
+		[Category("DailyView.Appointment")]
+		[System.ComponentModel.DefaultValue(20)]
+		public int HorizontalAppointmentHeight
+		{
+			get
+			{
+				return horizontalAppointmentHeight;
+			}
+			set
+			{
+				if (horizontalAppointmentHeight == value)
+					return;
+
+				horizontalAppointmentHeight = value;
+				this.Invalidate();
+			}
+		}
+
+		[Category("DailyView.Appointment")]
+		public AppHeightDrawMode AppointmentHeightMode
+		{
+			get { return appHeightMode; }
+			set { appHeightMode = value; }
+		}
+		
+		[Category("DailyView.Appointment")]
+        [DefaultValue(true)]
+        public bool AllowNew
+        {
+            get
+            {
+                return allowNew;
+            }
+            set
+            {
+                allowNew = value;
+            }
+        }
+
+		[Category("DailyView.Appointment")]
+		public bool EnableShadows
+		{
+			get
+			{
+				return enableShadows;
+			}
+			set
+			{
+				if (enableShadows == value)
+					return;
+				enableShadows = value;
+				this.Invalidate();
+			}
+		}
+
+		[Category("DailyView.Appointment")]
+		public bool EnableRoundedCorners
+		{
+			get
+			{
+				return enableRoundCorners;
+			}
+			set
+			{
+				if (enableRoundCorners == value)
+					return;
+				enableRoundCorners = value;
+				this.Invalidate();
+			}
+		}
+
+		[Category("DailyView.Appointment")]
+		public bool EnableTimeIndicator
+		{
+			get
+			{
+				return enableTimeIndicator;
+			}
+			set
+			{
+				if (value == enableTimeIndicator)
+					return;
+				enableTimeIndicator = value;
+				this.Invalidate();
+			}
+		}
+
+		[Category("DailyView.Appointment")]
+		public bool EnableDurationDisplay
+		{
+			get
+			{
+				return enableDurationDisplay;
+			}
+			set
+			{
+				if (value == enableDurationDisplay)
+					return;
+				enableDurationDisplay = value;
+				this.Invalidate();
+			}
+		}
+
+		[Category("DailyView.Appointment")]
+		[System.ComponentModel.DefaultValue(AppointmentSlotDuration.ThirtyMinutes)]
+		public AppointmentSlotDuration AppointmentDuration
+		{
+			get
+			{
+				return appointmentSlotDuration;
+			}
+			set
+			{
+				if (appointmentSlotDuration == value)
+					return;
+				appointmentSlotDuration = value;
+				this.Invalidate();
+			}
+		}
+		#endregion
+
+		#region " Property Overrides "
+		[System.ComponentModel.Browsable(false)]
+		public override Color BackColor
+		{
+			get
+			{
+				return base.BackColor;
+			}
+			set
+			{
+				base.BackColor = value;
+			}
+		}
+		[System.ComponentModel.Browsable(false)]
+		public override string Text
+		{
+			get
+			{
+				return base.Text;
+			}
+			set
+			{
+				base.Text = value;
+			}
+		}
+		[System.ComponentModel.Browsable(false)]
+		public override Image BackgroundImage
+		{
+			get
+			{
+				return base.BackgroundImage;
+			}
+			set
+			{
+				base.BackgroundImage = value;
+			}
+		}
+		[System.ComponentModel.Browsable(false)]
+		public override ImageLayout BackgroundImageLayout
+		{
+			get
+			{
+				return base.BackgroundImageLayout;
+			}
+			set
+			{
+				base.BackgroundImageLayout = value;
+			}
+		}
+		[System.ComponentModel.Browsable(false)]
+		public override System.Drawing.Color ForeColor
+		{
+			get
+			{
+				return base.ForeColor;
+			}
+			set
+			{
+				base.ForeColor = value;
+			}
+		}
+		[System.ComponentModel.Browsable(false)]
+		public override Font Font
+		{
+			get
+			{
+				return base.Font;
+			}
+			set
+			{
+				base.Font = value;
+			}
+		}
+		[System.ComponentModel.Browsable(false)]
+		public override RightToLeft RightToLeft
+		{
+			get
+			{
+				return base.RightToLeft;
+			}
+			set
+			{
+				base.RightToLeft = value;
+			}
+		}
+		#endregion
+
+		#region " Private Properties "
+		[System.ComponentModel.Browsable(false)]
+		public DateTime SelectionStart
+		{
+			get { return selectionStart; }
+			set { selectionStart = value; }
+		}
+
+		[System.ComponentModel.Browsable(false)]
+		public DateTime SelectionEnd
+		{
+			get { return selectionEnd; }
+			set { selectionEnd = value; }
+		}
+		
+		[System.ComponentModel.Browsable(false)]
+		public bool SelectedAppointmentIsNew
+		{
+			get
+			{
+				return selectedAppointmentIsNew;
+			}
+		}
+
+		[System.ComponentModel.Browsable(false)]
+		public int VScrollBarWith
+		{
+			get
+			{
+				if (scrollbar.Visible)
+					return scrollbar.Width;
+				else
+					return 0;
+			}
+		}
+
+		[System.ComponentModel.Browsable(false)]
+		public ITool ActiveTool
+		{
+			get { return activeTool; }
+			set { activeTool = value; }
+		}
+
+		[System.ComponentModel.Browsable(false)]
+		public bool CurrentlyEditing
+		{
+			get
+			{
+				return editbox.Visible;
+			}
+		}
+
+		[System.ComponentModel.Browsable(false)]
+		public Appointment SelectedAppointment
+		{
+			get { return selectedAppointment; }
+		}
+
+		[System.ComponentModel.Browsable(false)]
+		public SelectionType Selection
+		{
+			get
+			{
+				return selection;
+			}
+		}
+
+		[System.ComponentModel.Browsable(false)]
+		[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+		public AbstractRenderer Renderer
+		{
+			get
+			{
+				return renderer;
+			}
+			set
+			{
+				if (renderer == value)
+					return;
+
+				renderer = value;
+				this.Font = renderer.BaseFont;
+				this.Invalidate();
+			}
+		}
+		
+		[System.ComponentModel.Browsable(false)]
+		private int HeaderHeight
+		{
+			get
+			{
+				return dayHeadersHeight + allDayEventsHeaderHeight;
+			}
+		}
+		#endregion
+
+		#region Event Handlers
+		private void editbox_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Escape)
+            {
+                e.Handled = true;
+                FinishEditing(true);
+            }
+            else if (e.KeyCode == Keys.Enter)
+            {
+                e.Handled = true;
+                FinishEditing(false);
+            }
+        }
+
+		private void selectionTool_Complete(object sender, EventArgs e)
+        {
+            if (selectedAppointment != null)
+            {
+                System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(EnterEditMode));
+            }
+        }
+
+		private void scrollbar_Scroll(object sender, ScrollEventArgs e)
+        {
+            Invalidate();
+			
+			//scroll text box too
+            if (editbox.Visible)
+                editbox.Top += e.OldValue - e.NewValue;
+        }
+
+        protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
+        {
+            base.SetBoundsCore(x, y, width, height, specified);
+            AdjustScrollbar();
+        }
+
+        protected override void OnPaintBackground(PaintEventArgs pevent)
+        {
+            // Flicker free
+        }
+
+        protected override void OnMouseDown(MouseEventArgs e)
+        {
+            // Capture focus
+            this.Focus();
+
+            if (CurrentlyEditing)
+            {
+                FinishEditing(false);
+            }
+
+            if (selectedAppointmentIsNew)
+            {
+                RaiseNewAppointment();
+            }
+
+            ITool newTool = null;
+
+            Appointment appointment = GetAppointmentAt(e.X, e.Y);
+
+            if (e.Y < HeaderHeight && e.Y > dayHeadersHeight && appointment == null)
+            {
+                if (selectedAppointment != null)
+                {
+                    selectedAppointment = null;
+                    Invalidate();
+                }
+
+                newTool = drawTool;
+                selection = SelectionType.None;
+
+                base.OnMouseDown(e);
+                return;
+            }
+
+            if (appointment == null)
+            {
+                if (selectedAppointment != null)
+                {
+                    selectedAppointment = null;
+                    Invalidate();
+                }
+
+                newTool = drawTool;
+                selection = SelectionType.DateRange;
+            }
+            else
+            {
+                newTool = selectionTool;
+                selectedAppointment = appointment;
+                selection = SelectionType.Appointment;
+
+                Invalidate();
+            }
+
+            if (activeTool != null)
+            {
+                activeTool.MouseDown(e);
+            }
+
+            if ((activeTool != newTool) && (newTool != null))
+            {
+                newTool.Reset();
+                newTool.MouseDown(e);
+            }
+
+            activeTool = newTool;
+
+            base.OnMouseDown(e);
+        }
+
+        protected override void OnMouseMove(MouseEventArgs e)
+        {
+            if (activeTool != null)
+                activeTool.MouseMove(e);
+
+            base.OnMouseMove(e);
+        }
+
+        protected override void OnMouseUp(MouseEventArgs e)
+        {
+            if (activeTool != null)
+                activeTool.MouseUp(e);
+
+            base.OnMouseUp(e);
+        }
+
+        protected override void OnMouseWheel(MouseEventArgs e)
+        {
+            base.OnMouseWheel(e);
+
+            if (e.Delta < 0)
+            {//mouse wheel scroll down
+                ScrollMe(true);
+            }
+            else
+            {//mouse wheel scroll up
+                ScrollMe(false);
+            }
+        }
+
+		protected override void OnKeyPress(KeyPressEventArgs e)
+        {
+            if ((allowNew) && char.IsLetterOrDigit(e.KeyChar))
+            {
+                if ((this.Selection == SelectionType.DateRange))
+                {
+                    if (!selectedAppointmentIsNew)
+                        EnterNewAppointmentMode(e.KeyChar);
+                }
+            }
+        }
+
+		protected virtual void ResolveAppointments(ResolveAppointmentsEventArgs args)
+		{
+			//System.Diagnostics.Debug.WriteLine("Resolve app");
+
+			if (OnResolveAppointments != null)
+				OnResolveAppointments(this, args);
+
+			this.allDayEventsHeaderHeight = 0;
+
+			// cache resolved appointments in hashtable by days.
+			cachedAppointments.Clear();
+
+			if ((selectedAppointmentIsNew) && (selectedAppointment != null))
+			{
+				if ((selectedAppointment.StartDate > args.StartDate) && (selectedAppointment.StartDate < args.EndDate))
+				{
+					args.Appointments.Add(selectedAppointment);
+				}
+			}
+
+			foreach (Appointment appointment in args.Appointments)
+			{
+				int key = -1;
+				AppointmentList list;
+
+				if (appointment.StartDate.Day == appointment.EndDate.Day && appointment.AllDayEvent == false)
+				{
+					key = appointment.StartDate.Day;
+				}
+				else
+				{
+					key = -1;
+				}
+
+				list = (AppointmentList)cachedAppointments[key];
+
+				if (list == null)
+				{
+					list = new AppointmentList();
+					cachedAppointments[key] = list;
+				}
+
+				list.Add(appointment);
+			}
+		}
+		#endregion
+
+        #region " Public Methods "
+
+        public void ScrollMe(bool down)
+        {
+			if (this.AllowScroll == false)
+				return;
+
+			int newScrollValue;
+
+            if (down)
+            {//mouse wheel scroll down
+                newScrollValue = this.scrollbar.Value + this.scrollbar.SmallChange;
+
+                if (newScrollValue < this.scrollbar.Maximum)
+                    this.scrollbar.Value = newScrollValue;
+                else
+                    this.scrollbar.Value = this.scrollbar.Maximum;
+            }
+            else
+            {//mouse wheel scroll up
+                newScrollValue = this.scrollbar.Value - this.scrollbar.SmallChange;
+
+                if (newScrollValue > this.scrollbar.Minimum)
+                    this.scrollbar.Value = newScrollValue;
+                else
+                    this.scrollbar.Value = this.scrollbar.Minimum;
+            }
+
+			this.Invalidate();
+        }
+
+        public Rectangle GetTrueRectangle()
+        {
+            Rectangle truerect;
+            truerect = this.ClientRectangle;
+            truerect.X += hourLabelWidth + hourLabelIndent;
+			truerect.Width -= VScrollBarWith + hourLabelWidth + hourLabelIndent;
+            truerect.Y += this.HeaderHeight;
+            truerect.Height -= this.HeaderHeight;
+
+            return truerect;
+        }
+
+        public Rectangle GetFullDayApptsRectangle()
+        {
+            Rectangle fulldayrect;
+            fulldayrect = this.ClientRectangle;
+            fulldayrect.Height = this.HeaderHeight - dayHeadersHeight;
+            fulldayrect.Y += dayHeadersHeight;
+			fulldayrect.Width -= (hourLabelWidth + hourLabelIndent + this.VScrollBarWith);
+            fulldayrect.X += hourLabelWidth + hourLabelIndent;
+
+            return fulldayrect;
+        }
+        
+        public void StartEditing()
+        {
+            if (!selectedAppointment.Locked && appointmentViews.ContainsKey(selectedAppointment))
+            {
+                Rectangle editBounds = appointmentViews[selectedAppointment].Rectangle;
+
+                editBounds.Inflate(-3, -3);
+                editBounds.X += appointmentGripWidth - 2;
+                editBounds.Width -= appointmentGripWidth - 5;
+
+                editbox.Bounds = editBounds;
+                editbox.Text = selectedAppointment.Subject;
+                editbox.Visible = true;
+                editbox.SelectionStart = editbox.Text.Length;
+                editbox.SelectionLength = 0;
+
+                editbox.Focus();
+            }
+        }
+
+        public void FinishEditing(bool cancel)
+        {
+            editbox.Visible = false;
+
+            if (!cancel)
+            {
+                if (selectedAppointment != null)
+                    selectedAppointment.Subject = editbox.Text;
+            }
+            else
+            {
+                if (selectedAppointmentIsNew)
+                {
+                    selectedAppointment = null;
+                    selectedAppointmentIsNew = false;
+                }
+            }
+
+            Invalidate();
+            this.Focus();
+        }
+
+        public DateTime GetTimeAt(int x, int y)
+        {
+			int dayWidth = (this.Width - (VScrollBarWith + hourLabelWidth + hourLabelIndent)) / daysToShow;
+
+            int hour = (y - this.HeaderHeight + scrollbar.Value) / appointmentSlotHeight;
+            x -= hourLabelWidth;
+
+            DateTime date = startDate;
+
+            date = date.Date;
+            date = date.AddDays(x / dayWidth);
+
+            if ((hour > 0) && (hour < 24 * 2))
+                date = date.AddMinutes((hour * 30));
+
+            return date;
+        }
+
+        public Appointment GetAppointmentAt(int x, int y)
+        {
+            foreach (AppointmentView view in appointmentViews.Values)
+                if (view.Rectangle.Contains(x, y))
+                    return view.Appointment;
+
+            foreach (AppointmentView view in longappointmentViews.Values)
+                if (view.Rectangle.Contains(x, y))
+                    return view.Appointment;
+
+            return null;
+		}
+
+		private Rectangle GetHourRangeRectangle(DateTime start, DateTime end, Rectangle baseRectangle)
+		{
+			Rectangle rect = baseRectangle;
+
+			int startY;
+			int endY;
+
+			startY = (start.Hour * appointmentSlotHeight * 2) + ((start.Minute * appointmentSlotHeight) / 30);
+			endY = (end.Hour * appointmentSlotHeight * 2) + ((end.Minute * appointmentSlotHeight) / 30);
+
+			rect.Y = startY - scrollbar.Value + this.HeaderHeight;
+
+			rect.Height = System.Math.Max(1, endY - startY);
+
+			return rect;
+		}
+		#endregion
+		
+		#region " Private Methods "
+		private void AdjustScrollbar()
+		{
+			scrollbar.Maximum = (2 * appointmentSlotHeight * 25) - this.Height + this.HeaderHeight;
+			scrollbar.Minimum = 0;
+		}
+		protected virtual void OnStartHourChanged()
+		{
+			// Fix : http://www.codeproject.com/cs/miscctrl/Calendardayview.asp?forumid=232232&select=1901930&df=100#xx1901930xx
+
+			if ((startHour * 2 * appointmentSlotHeight) > scrollbar.Maximum) //maximum is lower on larger forms
+			{
+				scrollbar.Value = scrollbar.Maximum;
+			}
+			else
+			{
+				scrollbar.Value = (startHour * 2 * appointmentSlotHeight);
+			}
+
+			Invalidate();
+		}
+		private void UpdateWorkingHours()
+		{
+			workStart = new DateTime(1, 1, 1, workingHourStart, workingMinuteStart, 0);
+			workEnd = new DateTime(1, 1, 1, workingHourEnd, workingMinuteEnd, 0);
+
+			Invalidate();
+		}
+		private void EnterNewAppointmentMode(char key)
+		{
+			Appointment appointment = new Appointment();
+			appointment.StartDate = selectionStart;
+			appointment.EndDate = selectionEnd;
+			appointment.Subject = key.ToString();
+
+			selectedAppointment = appointment;
+			selectedAppointmentIsNew = true;
+
+			activeTool = selectionTool;
+
+			Invalidate();
+
+			System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(EnterEditMode));
+		}
+
+		private delegate void StartEditModeDelegate(object state);
+		private void EnterEditMode(object state)
+		{
+			if (!allowInplaceEditing)
+				return;
+
+			if (this.InvokeRequired)
+			{
+				Appointment selectedApp = selectedAppointment;
+
+				System.Threading.Thread.Sleep(200);
+
+				if (selectedApp == selectedAppointment)
+					this.Invoke(new StartEditModeDelegate(EnterEditMode), state);
+			}
+			else
+			{
+				StartEditing();
+			}
+		}
+		#endregion
+
+		#region " Method Overrides "
+		protected override void Dispose(bool disposing)
+		{
+			if (disposing)
+			{
+				editbox.Dispose();
+				scrollbar.Dispose();
+			}
+			base.Dispose(disposing);
+		}
+		#endregion
+
+		#region " Drawing Methods "
+		protected override void OnPaint(PaintEventArgs e)
+        {
+			e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
+
+			// resolve appointments on visible date range.
+			ResolveAppointmentsEventArgs args = new ResolveAppointmentsEventArgs(this.StartDate, this.StartDate.AddDays(daysToShow));
+			ResolveAppointments(args);
+
+			using (SolidBrush backBrush = new SolidBrush(renderer.BackColor))
+				e.Graphics.FillRectangle(backBrush, this.ClientRectangle);
+
+			// Visible Rectangle
+			Rectangle rectangle = new Rectangle(0, 0, this.Width - VScrollBarWith, this.Height);
+
+			DrawDays(ref e, rectangle);
+
+			DrawHourLabels(ref e, rectangle);
+
+			DrawDayHeaders(ref e, rectangle);
+        }
+
+		private void DrawDays(ref PaintEventArgs e, Rectangle rectangle)
+		{
+			Rectangle rect = rectangle;
+			rect.X += hourLabelWidth + hourLabelIndent;
+			rect.Y += this.HeaderHeight;
+			rect.Width -= (hourLabelWidth + hourLabelIndent);
+
+
+			if (e.ClipRectangle.IntersectsWith(rect) == false)
+				return;
+
+			int dayWidth = rect.Width / daysToShow;
+
+			#region " Multi Day Appointments "
+			AppointmentList longAppointments = (AppointmentList)cachedAppointments[-1];
+
+			AppointmentList drawnLongApps = new AppointmentList();
+
+			AppointmentView view;
+
+			int y = dayHeadersHeight;
+			bool intersect = false;
+
+			List<int> layers = new List<int>();
+			if (longAppointments != null)
+			{
+
+				foreach (Appointment appointment in longAppointments)
+				{
+					appointment.Layer = 0;
+
+					if (drawnLongApps.Count != 0)
+					{
+						foreach (Appointment app in drawnLongApps)
+							if (!layers.Contains(app.Layer))
+								layers.Add(app.Layer);
+
+						foreach (int lay in layers)
+						{
+							foreach (Appointment app in drawnLongApps)
+							{
+								if (app.Layer == lay)
+									if (appointment.StartDate.Date >= app.EndDate.Date || appointment.EndDate.Date <= app.StartDate.Date)
+										intersect = false;
+									else
+									{
+										intersect = true;
+										break;
+									}
+								appointment.Layer = lay;
+							}
+
+							if (!intersect)
+								break;
+						}
+
+						if (intersect)
+							appointment.Layer = layers.Count;
+					}
+
+					drawnLongApps.Add(appointment); // changed by Gimlei
+				}
+
+				foreach (Appointment app in drawnLongApps)
+					if (!layers.Contains(app.Layer))
+						layers.Add(app.Layer);
+
+				allDayEventsHeaderHeight = layers.Count * (horizontalAppointmentHeight + 5) + 5;
+
+				Rectangle backRectangle = rect;
+				backRectangle.Y = y;
+				backRectangle.Height = allDayEventsHeaderHeight;
+
+				renderer.DrawAllDayBackground(e.Graphics, backRectangle);
+
+				foreach (Appointment appointment in longAppointments)
+				{
+					Rectangle appointmenRect = rect;
+					int spanDays = appointment.EndDate.Subtract(appointment.StartDate).Days;
+
+					if (appointment.EndDate.Day != appointment.StartDate.Day && appointment.EndDate.TimeOfDay < appointment.StartDate.TimeOfDay)
+						spanDays += 1;
+
+					appointmenRect.Width = dayWidth * spanDays - 5;
+					appointmenRect.Height = horizontalAppointmentHeight;
+					appointmenRect.X += (appointment.StartDate.Subtract(startDate).Days) * dayWidth; // changed by Gimlei
+					appointmenRect.Y = y + appointment.Layer * (horizontalAppointmentHeight + 5) + 5; // changed by Gimlei
+
+					view = new AppointmentView();
+					view.Rectangle = appointmenRect;
+					view.Appointment = appointment;
+
+					longappointmentViews[appointment] = view;
+
+					Rectangle gripRect = appointmenRect;
+					gripRect.Width = appointmentGripWidth;
+
+					renderer.DrawAppointment(e.Graphics, appointmenRect, appointment, appointment == selectedAppointment, gripRect, EnableShadows, EnableRoundedCorners);
+
+				}
+			}
+			#endregion
+
+			DateTime time = startDate;
+			Rectangle rectangle2 = rect;
+			rectangle2.Width = dayWidth;
+			rectangle2.Y += allDayEventsHeaderHeight;
+			rectangle2.Height -= allDayEventsHeaderHeight;
+
+			appointmentViews.Clear();
+			layers.Clear();
+
+			for (int day = 0; day < daysToShow; day++)
+			{
+				DrawDay(ref e, rectangle2, time);
+
+				rectangle2.X += dayWidth;
+
+				time = time.AddDays(1);
+			}
+		}
+
+		private void DrawHourLabels(ref PaintEventArgs e, Rectangle rectangle)
+        {
+			Rectangle rect = rectangle;
+			rect.Y += this.HeaderHeight;
+
+            e.Graphics.SetClip(rect);
+
+			int hourlabelheight = (int)AppointmentDuration * AppointmentSlotHeight;
+
+            for (int m_Hour = 0; m_Hour < 24; m_Hour++)
+            {
+                Rectangle hourRectangle = rect;
+
+                hourRectangle.Y = rect.Y + (m_Hour * 2 * appointmentSlotHeight) - scrollbar.Value;
+                hourRectangle.X += hourLabelIndent;
+                hourRectangle.Width = hourLabelWidth;
+				hourRectangle.Height = hourlabelheight;
+
+                if (hourRectangle.Y > this.HeaderHeight / 2)
+                    renderer.DrawHourLabel(e.Graphics, hourRectangle, m_Hour, this.AmPmDisplay, EnableTimeIndicator);
+            }
+
+            e.Graphics.ResetClip();
+        }
+
+		private void DrawDayHeaders(ref PaintEventArgs e, Rectangle rectangle)
+        {
+			Rectangle rect = rectangle;
+			rect.X += hourLabelWidth + hourLabelIndent;
+			rect.Width -= (hourLabelWidth + hourLabelIndent);
+			rect.Height = dayHeadersHeight;
+
+			if (e.ClipRectangle.IntersectsWith(rect) == false)
+				return;
+
+            int dayWidth = rect.Width / daysToShow;
+
+            //one day header rectangle
+            Rectangle dayHeaderRectangle = new Rectangle(rect.Left, rect.Top, dayWidth, rect.Height);
+            DateTime headerDate = startDate;
+
+            for (int day = 0; day < daysToShow; day++)
+            {
+                renderer.DrawDayHeader(e.Graphics, dayHeaderRectangle, headerDate);
+
+                dayHeaderRectangle.X += dayWidth;
+                headerDate = headerDate.AddDays(1);
+            }
+			Rectangle scrollrect = rectangle;
+			if (this.AllowScroll == false)
+			{
+				scrollrect.X = rect.Width + hourLabelWidth + hourLabelIndent;
+				scrollrect.Width = VScrollBarWith;
+				using (SolidBrush backBrush = new SolidBrush(renderer.BackColor))
+					e.Graphics.FillRectangle(backBrush, scrollrect);
+			}
+        }
+
+        private void DrawDay(ref PaintEventArgs e, Rectangle rect, DateTime time)
+        {
+            Rectangle workingHoursRectangle = GetHourRangeRectangle(workStart, workEnd, rect);
+
+            if (workingHoursRectangle.Y < this.HeaderHeight)
+            {
+                // Fix : http://www.codeproject.com/cs/miscctrl/Calendardayview.asp?forumid=232232&select=1904152&df=100#xx1904152xx
+                
+                workingHoursRectangle.Height -= this.HeaderHeight - workingHoursRectangle.Y;
+                workingHoursRectangle.Y = this.HeaderHeight;
+            }
+
+            if (!((time.DayOfWeek == DayOfWeek.Saturday) || (time.DayOfWeek == DayOfWeek.Sunday))) //weekends off -> no working hours
+                renderer.DrawHourRange(e.Graphics, workingHoursRectangle, false, false);
+
+            if ((selection == SelectionType.DateRange) && (time.Day == selectionStart.Day))
+            {
+                Rectangle selectionRectangle = GetHourRangeRectangle(selectionStart, selectionEnd, rect);
+                if (selectionRectangle.Top + 1 > this.HeaderHeight)
+                renderer.DrawHourRange(e.Graphics, selectionRectangle, false, true);
+            }
+
+            e.Graphics.SetClip(rect);
+
+            for (int hour = 0; hour < 24 * 2; hour++)
+            {
+                int y = rect.Top + (hour * appointmentSlotHeight) - scrollbar.Value;
+
+				using (Pen pen = new Pen(((hour % 2) == 0 ? renderer.HalfHourSeperatorColor : renderer.HourSeperatorColor)))
+                    e.Graphics.DrawLine(pen, rect.Left, y, rect.Right, y);
+
+                if (y > rect.Bottom)
+                    break;
+            }
+
+            renderer.DrawDayGripper(e.Graphics, rect, dayGripWidth);
+
+            e.Graphics.ResetClip();
+
+            AppointmentList appointments = (AppointmentList)cachedAppointments[time.Day];
+
+            if (appointments != null)
+            {
+                List<string> groups = new List<string>();
+
+                foreach (Appointment app in appointments)
+                    if (!groups.Contains(app.Group))
+                        groups.Add(app.Group);
+
+                Rectangle rect2 = rect;
+                rect2.Width = rect2.Width / groups.Count;
+
+                //groups.Sort();
+
+                foreach (string group in groups)
+                {
+                    DrawAppointments(ref e, rect2, time, group);
+
+                    rect2.X += rect2.Width;
+                }
+            }
+        }
+
+        private void DrawAppointments(ref PaintEventArgs e, Rectangle rect, DateTime time, string group)
+        {
+            DateTime timeStart = time.Date;
+            DateTime timeEnd = timeStart.AddHours(24);
+            timeEnd = timeEnd.AddSeconds(-1);
+
+            AppointmentList appointments = (AppointmentList)cachedAppointments[time.Day];
+
+            if (appointments != null)
+            {
+                HalfHourLayout[] layout = GetMaxParalelAppointments(appointments);
+                
+                List<Appointment> drawnItems = new List<Appointment>();
+
+                for (int halfHour = 0; halfHour < 24 * 2; halfHour++)
+                {
+                    HalfHourLayout hourLayout = layout[halfHour];
+
+                    if ((hourLayout != null) && (hourLayout.Count > 0))
+                    {
+                        for (int appIndex = 0; appIndex < hourLayout.Count; appIndex++)
+                        {
+                            Appointment appointment = hourLayout.Appointments[appIndex];
+
+                            if (appointment.Group != group)
+                                continue;
+
+                            if (drawnItems.IndexOf(appointment) < 0)
+                            {
+                                Rectangle appRect = rect;
+                                int appointmentWidth;
+                                AppointmentView view;
+
+                                appointmentWidth = rect.Width / appointment.conflictCount;
+
+								int lastX = 0;
+
+                                foreach (Appointment app in hourLayout.Appointments)
+                                {
+                                    if ((app != null) && (app.Group == appointment.Group) && (appointmentViews.ContainsKey(app)))
+                                    {
+                                        view = appointmentViews[app];
+
+                                        if (lastX < view.Rectangle.X)
+                                            lastX = view.Rectangle.X;
+                                    }
+                                }
+
+                                if ((lastX + (appointmentWidth * 2)) > (rect.X + rect.Width))
+                                    lastX = 0;
+
+                                appRect.Width = appointmentWidth - 5;
+
+                                if (lastX > 0)
+                                    appRect.X = lastX + appointmentWidth;
+
+                                DateTime appstart = appointment.StartDate;
+                                DateTime append = appointment.EndDate;
+
+                                // Draw the appts boxes depending on the height display mode                           
+                                // If small appts are to be drawn in half-hour blocks
+                                if (this.AppointmentHeightMode == AppHeightDrawMode.FullHalfHourBlocksShort && appointment.EndDate.Subtract(appointment.StartDate).TotalMinutes < 30)
+                                {
+                                    // Round the start/end time to the last/next halfhour
+                                    appstart = appointment.StartDate.AddMinutes(-appointment.StartDate.Minute);
+                                    append = appointment.EndDate.AddMinutes(30 - appointment.EndDate.Minute);
+                                    
+                                    // Make sure we've rounded it to the correct halfhour :)
+                                    if (appointment.StartDate.Minute >= 30)
+                                        appstart = appstart.AddMinutes(30);
+                                    if (appointment.EndDate.Minute > 30)
+                                        append = append.AddMinutes(30);
+                                }
+
+                                // This is basically the same as previous mode, but for all appts
+                                else if (this.AppointmentHeightMode == AppHeightDrawMode.FullHalfHourBlocksAll)
+                                {
+                                    appstart = appointment.StartDate.AddMinutes(-appointment.StartDate.Minute);
+                                    if (appointment.EndDate.Minute != 0 && appointment.EndDate.Minute != 30)
+                                        append = appointment.EndDate.AddMinutes(30 - appointment.EndDate.Minute);
+                                    else
+                                        append = appointment.EndDate;
+
+                                    if (appointment.StartDate.Minute >= 30)
+                                        appstart = appstart.AddMinutes(30);
+                                    if (appointment.EndDate.Minute > 30)
+                                        append = append.AddMinutes(30);
+                                }
+
+                                // Based on previous code
+                                else if (this.AppointmentHeightMode == AppHeightDrawMode.EndHalfHourBlocksShort && appointment.EndDate.Subtract(appointment.StartDate).TotalMinutes < 30)
+                                {
+                                    // Round the end time to the next halfhour
+                                    append = appointment.EndDate.AddMinutes(30 - appointment.EndDate.Minute);
+
+                                    // Make sure we've rounded it to the correct halfhour :)
+                                    if (appointment.EndDate.Minute > 30)
+                                        append = append.AddMinutes(30);
+                                }
+
+                                else if (this.AppointmentHeightMode == AppHeightDrawMode.EndHalfHourBlocksAll)
+                                {
+                                    // Round the end time to the next halfhour
+                                    if (appointment.EndDate.Minute != 0 && appointment.EndDate.Minute != 30)
+                                        append = appointment.EndDate.AddMinutes(30 - appointment.EndDate.Minute);
+                                    else
+                                        append = appointment.EndDate;
+                                    // Make sure we've rounded it to the correct halfhour :)
+                                    if (appointment.EndDate.Minute > 30)
+                                        append = append.AddMinutes(30);
+                                }
+
+                                appRect = GetHourRangeRectangle(appstart, append, appRect);
+
+                                view = new AppointmentView();
+                                view.Rectangle = appRect;
+                                view.Appointment = appointment;
+
+                                appointmentViews[appointment] = view;
+
+                                e.Graphics.SetClip(rect);
+
+                                if (this.DrawAllAppBorder)
+                                    appointment.DrawBorder = true;
+
+                                // Procedure for gripper rectangle is always the same
+								Rectangle gripRect = appRect;
+                                gripRect.Width = appointmentGripWidth;
+                                
+                                renderer.DrawAppointment(e.Graphics, appRect, appointment, appointment == selectedAppointment, gripRect, this.EnableShadows, this.enableRoundCorners);
+
+                                e.Graphics.ResetClip();
+
+                                drawnItems.Add(appointment);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        private static HalfHourLayout[] GetMaxParalelAppointments(List<Appointment> appointments)
+        {
+            HalfHourLayout[] appLayouts = new HalfHourLayout[24 * 2];
+
+            foreach (Appointment appointment in appointments)
+            {
+                appointment.conflictCount = 1;
+            }
+
+            foreach (Appointment appointment in appointments)
+            {
+                int firstHalfHour = appointment.StartDate.Hour * 2 + (appointment.StartDate.Minute / 30);
+                int lastHalfHour = appointment.EndDate.Hour * 2 + (appointment.EndDate.Minute / 30);
+
+                // Added to allow small parts been displayed
+                if (lastHalfHour == firstHalfHour)
+                {
+                    if (lastHalfHour < 24 * 2)
+                        lastHalfHour++;
+                    else
+                        firstHalfHour--;
+                }
+
+                for (int halfHour = firstHalfHour; halfHour < lastHalfHour; halfHour++)
+                {
+                    HalfHourLayout layout = appLayouts[halfHour];
+
+                    if (layout == null)
+                    {
+                        layout = new HalfHourLayout();
+                        layout.Appointments = new Appointment[20];
+                        appLayouts[halfHour] = layout;
+                    }
+
+                    layout.Appointments[layout.Count] = appointment;
+
+                    layout.Count++;
+
+                    List<string> groups = new List<string>();
+
+                    foreach (Appointment app2 in layout.Appointments)
+                    {
+                        if ((app2 != null) && (!groups.Contains(app2.Group)))
+                            groups.Add(app2.Group);
+                    }
+
+                    layout.Groups = groups;
+
+                    // update conflicts
+                    foreach (Appointment app2 in layout.Appointments)
+                    {
+                        if ((app2 != null) && (app2.Group == appointment.Group))
+                            if (app2.conflictCount < layout.Count)
+                                app2.conflictCount = layout.Count - (layout.Groups.Count - 1);
+                    }
+                }
+            }
+
+            return appLayouts;
+        }
+        #endregion
+
+        #region " Internal Utility Classes "
+
+        internal class HalfHourLayout
+        {
+            public int Count;
+            public List<string> Groups;
+            public Appointment[] Appointments;
+        }
+
+        internal class AppointmentView
+        {
+            public Appointment Appointment;
+            public Rectangle Rectangle;
+        }
+
+        internal class AppointmentList : List<Appointment>
+        {
+        }
+
+        #endregion
+
+        #region " Events "
+        public event EventHandler<EventArgs> OnSelectionChanged;
+		public event EventHandler<ResolveAppointmentsEventArgs> OnResolveAppointments;
+		public event EventHandler<NewAppointmentEventArgs> OnNewAppointment;
+        public event EventHandler<AppointmentEventArgs> OnAppointmentMove;
+
+		internal void RaiseNewAppointment()
+		{
+			NewAppointmentEventArgs args = new NewAppointmentEventArgs(selectedAppointment.Subject, selectedAppointment.StartDate, selectedAppointment.EndDate);
+
+			if (OnNewAppointment != null)
+			{
+				OnNewAppointment(this, args);
+			}
+
+			selectedAppointment = null;
+			selectedAppointmentIsNew = false;
+
+			Invalidate();
+		}
+
+		internal void RaiseSelectionChanged(EventArgs e)
+		{
+			if (OnSelectionChanged != null)
+				OnSelectionChanged(this, e);
+		}
+
+		internal void RaiseAppointmentMove(AppointmentEventArgs e)
+		{
+			if (OnAppointmentMove != null)
+				OnAppointmentMove(this, e);
+		}
+        #endregion
+    }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/HeuristicLab.Calendar-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/HeuristicLab.Calendar-3.3.csproj	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/HeuristicLab.Calendar-3.3.csproj	(revision 4105)
@@ -0,0 +1,165 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{D17A4D6A-4CAA-4470-8A19-F42463C021FD}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Calendar</RootNamespace>
+    <AssemblyName>HeuristicLab.Calendar-3.3</AssemblyName>
+    <SccProjectName>
+    </SccProjectName>
+    <SccLocalPath>
+    </SccLocalPath>
+    <SccAuxPath>
+    </SccAuxPath>
+    <SccProvider>
+    </SccProvider>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
+      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Appointment\AppointmentSlot.cs" />
+    <Compile Include="Appointment\AppointmentSlotDuration.cs" />
+    <Compile Include="Appointment\iAppointment.cs" />
+    <Compile Include="CalendarPlugin.cs" />
+    <Compile Include="Properties\CalendarResources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>CalendarResources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="CalendarStorage\iCalendarStorage.cs" />
+    <Compile Include="Renderer\AbstractRenderer.cs" />
+    <Compile Include="Appointment\Appointment.cs">
+    </Compile>
+    <Compile Include="Appointment\AppointmentEventArgs.cs" />
+    <Compile Include="Appointment\AppointmentHieghtDrawMode.cs" />
+    <Compile Include="DayView.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="ViewTools\DrawTool.cs" />
+    <Compile Include="ViewTools\ITool.cs" />
+    <Compile Include="Appointment\NewAppointmentEvent.cs" />
+    <Compile Include="Renderer\Office12Renderer.cs" />
+    <Compile Include="Renderer\Office11Renderer.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Appointment\ResolveAppointmentsEvent.cs" />
+    <Compile Include="ViewTools\SelectionType.cs" />
+    <Compile Include="ViewTools\SelectionTool.cs" />
+    <Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Properties\CalendarResources.resx">
+      <Generator>PublicResXFileCodeGenerator</Generator>
+      <LastGenOutput>CalendarResources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Resources\LockedAppointment.png" />
+    <Content Include="Resources\recurring.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/HeuristicLab.Calendar-3.3.csproj.user
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/HeuristicLab.Calendar-3.3.csproj.user	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/HeuristicLab.Calendar-3.3.csproj.user	(revision 4105)
@@ -0,0 +1,14 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <PublishUrlHistory />
+    <InstallUrlHistory />
+    <SupportUrlHistory />
+    <UpdateUrlHistory />
+    <BootstrapperUrlHistory />
+    <ErrorReportUrlHistory />
+    <FallbackCulture>en-US</FallbackCulture>
+    <VerifyUploadedFiles>false</VerifyUploadedFiles>
+    <ProjectView>ShowAllFiles</ProjectView>
+  </PropertyGroup>
+</Project>
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/AssemblyInfo.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/AssemblyInfo.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/AssemblyInfo.cs	(revision 4105)
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("DayView")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Moreum")]
+[assembly: AssemblyProduct("DayView")]
+[assembly: AssemblyCopyright("Copyright © Moreum 2005")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("08c6be4c-e6ac-42ff-b05c-3efb47df115e")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: System.CLSCompliant(true)]
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/AssemblyInfo.frame
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/AssemblyInfo.frame	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/AssemblyInfo.frame	(revision 4105)
@@ -0,0 +1,61 @@
+#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.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using HeuristicLab.PluginInfrastructure;
+using System.Security;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Calendar")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("Copyright © Moreum 2005")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: AllowPartiallyTrustedCallers]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("B6BA196A-F2E3-4de2-AE8A-02D4995F8B57")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("3.3.0.$WCREV$")]
+[assembly: AssemblyFileVersion("3.3.0.$WCREV$")]
+[assembly: AssemblyBuildDate("$WCNOW$")]
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/CalendarResources.Designer.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/CalendarResources.Designer.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/CalendarResources.Designer.cs	(revision 4105)
@@ -0,0 +1,77 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.1
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace HeuristicLab.Calendar.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    public class CalendarResources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal CalendarResources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Calendar.Properties.CalendarResources", typeof(CalendarResources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        public static System.Drawing.Bitmap LockedAppointment {
+            get {
+                object obj = ResourceManager.GetObject("LockedAppointment", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        public static System.Drawing.Bitmap recurring {
+            get {
+                object obj = ResourceManager.GetObject("recurring", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+    }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/CalendarResources.resx
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/CalendarResources.resx	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/CalendarResources.resx	(revision 4105)
@@ -0,0 +1,127 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="LockedAppointment" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\resources\lockedappointment.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="recurring" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\resources\recurring.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+</root>
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Renderer/AbstractRenderer.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Renderer/AbstractRenderer.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Renderer/AbstractRenderer.cs	(revision 4105)
@@ -0,0 +1,227 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using System.Drawing.Drawing2D;
+using System.Drawing;
+
+namespace HeuristicLab.Calendar
+{
+    public abstract class AbstractRenderer : IDisposable
+    {
+        ~AbstractRenderer()
+        {
+            Dispose(false);
+        }
+
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        protected virtual void Dispose(bool mainThread)
+        {
+            if (hourFont != null)
+                hourFont.Dispose();
+
+            if (minuteFont != null)
+                minuteFont.Dispose();
+        }
+
+        public virtual Color AllDayEventsBackColor
+        {
+            get
+            {
+                return InterpolateColors(this.BackColor, Color.Black, 0.5f);
+            }
+        }
+
+        public virtual Font BaseFont
+        {
+            get
+            {
+                return Control.DefaultFont;
+            }
+        }
+
+        public virtual Color HourSeperatorColor
+        {
+            get
+            {
+                return System.Drawing.Color.FromArgb(234, 208, 152);
+            }
+        }
+
+        public virtual Color HalfHourSeperatorColor
+        {
+            get
+            {
+                return System.Drawing.Color.FromArgb(243, 228, 177);
+            }
+        }
+
+        public virtual Color HourColor
+        {
+            get
+            {
+                return System.Drawing.Color.FromArgb(255, 244, 188);
+            }
+        }
+
+        public virtual Color WorkingHourColor
+        {
+            get
+            {
+                return System.Drawing.Color.FromArgb(255, 255, 213);
+            }
+        }
+
+        public virtual Color BackColor
+        {
+            get
+            {
+                return SystemColors.Control;
+            }
+        }
+
+        public virtual Color SelectionColor
+        {
+            get
+            {
+                return SystemColors.Highlight;
+            }
+        }
+
+        private Font hourFont;
+
+        public virtual Font HourFont
+        {
+            get
+            {
+                if (hourFont == null)
+                {
+                    hourFont = new Font(BaseFont.FontFamily, 14, FontStyle.Regular);
+                }
+
+                return hourFont;
+            }
+        }
+
+        private Font minuteFont;
+
+        public virtual Font MinuteFont
+        {
+            get
+            {
+                if (minuteFont == null)
+                {
+                    minuteFont = new Font(BaseFont.FontFamily, 8, FontStyle.Regular);
+                }
+
+                return minuteFont;
+            }
+        }
+
+        public abstract void DrawHourLabel(Graphics g, Rectangle rect, int hour, bool ampm);
+
+		public abstract void DrawHourLabel(Graphics g, Rectangle rect, int hour, bool ampm, bool timeindicator);
+
+        public abstract void DrawDayHeader(Graphics g, Rectangle rect, DateTime date);
+
+        public abstract void DrawDayBackground(Graphics g, Rectangle rect);
+
+        public virtual void DrawHourRange(Graphics g, Rectangle rect, bool drawBorder, bool hilight)
+        {
+            if (g == null)
+                throw new ArgumentNullException("g");
+
+            using (SolidBrush brush = new SolidBrush(hilight ? this.SelectionColor : this.WorkingHourColor))
+            {
+                g.FillRectangle(brush, rect);
+            }
+
+            if (drawBorder)
+                g.DrawRectangle(SystemPens.WindowFrame, rect);
+        }
+
+        public virtual void DrawDayGripper(Graphics g, Rectangle rect, int gripWidth)
+        {
+            if (g == null)
+                throw new ArgumentNullException("g");
+
+            using (Brush m_Brush = new SolidBrush(Color.White))
+                g.FillRectangle(m_Brush, rect.Left, rect.Top - 1, gripWidth, rect.Height);
+
+            using (Pen m_Pen = new Pen(Color.Black))
+                g.DrawRectangle(m_Pen, rect.Left, rect.Top - 1, gripWidth, rect.Height);
+        }
+
+        public abstract void DrawAppointment(Graphics g, Rectangle rect, Appointment appointment, bool isSelected, Rectangle gripRect);
+
+		public abstract void DrawAppointment(Graphics g, Rectangle rect, Appointment appointment, bool isSelected, Rectangle gripRect, bool enableShadows, bool useroundedCorners);
+
+        public void DrawAllDayBackground(Graphics g, Rectangle rect)
+        {
+            if (g == null)
+                throw new ArgumentNullException("g");
+
+            using (Brush brush = new SolidBrush(InterpolateColors(this.BackColor, Color.Black, 0.5f)))
+                g.FillRectangle(brush, rect);
+        }
+
+        public static Color InterpolateColors(Color color1, Color color2, float percentage)
+        {
+            int num1 = ((int)color1.R);
+            int num2 = ((int)color1.G);
+            int num3 = ((int)color1.B);
+            int num4 = ((int)color2.R);
+            int num5 = ((int)color2.G);
+            int num6 = ((int)color2.B);
+            byte num7 = Convert.ToByte(((float)(((float)num1) + (((float)(num4 - num1)) * percentage))));
+            byte num8 = Convert.ToByte(((float)(((float)num2) + (((float)(num5 - num2)) * percentage))));
+            byte num9 = Convert.ToByte(((float)(((float)num3) + (((float)(num6 - num3)) * percentage))));
+            return Color.FromArgb(num7, num8, num9);
+        }
+
+		public static GraphicsPath CreateRoundRectangle(Rectangle rectangle)
+		{
+			int radius = 8;
+
+			GraphicsPath path = new GraphicsPath();
+			int l = rectangle.Left;
+			int t = rectangle.Top;
+			int w = rectangle.Width;
+			int h = rectangle.Height;
+			int d = radius << 1;
+			path.AddArc(l, t, d, d, 180, 90); // topleft
+			path.AddLine(l + radius, t, l + w - radius, t); // top
+			path.AddArc(l + w - d, t, d, d, 270, 90); // topright
+			path.AddLine(l + w, t + radius, l + w, t + h - radius); // right
+			path.AddArc(l + w - d, t + h - d, d, d, 0, 90); // bottomright
+			path.AddLine(l + w - radius, t + h, l + radius, t + h); // bottom
+			path.AddArc(l, t + h - d, d, d, 90, 90); // bottomleft
+			path.AddLine(l, t + h - radius, l, t + radius); // left
+			path.CloseFigure();
+			return path;
+		}
+
+		public static GraphicsPath CreateGripRectangle(Rectangle rectangle)
+		{
+			int radius = rectangle.Width;
+
+			GraphicsPath path = new GraphicsPath();
+			int l = rectangle.Left;
+			int t = rectangle.Top;
+			int w = rectangle.Width;
+			int h = rectangle.Height;
+			int d = radius << 1;
+			path.AddArc(l, t, d, d, 180, 90); // topleft
+			path.AddLine(l + w, t + radius, l + w, t + h - radius); // right
+			path.AddArc(l, t + h - d, d, d, 90, 90); // bottomleft
+			path.AddLine(l, t + h - radius, l, t + radius); // left
+			path.CloseFigure();
+			return path;
+		}
+    }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Renderer/Office11Renderer.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Renderer/Office11Renderer.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Renderer/Office11Renderer.cs	(revision 4105)
@@ -0,0 +1,155 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using System.Drawing;
+
+namespace HeuristicLab.Calendar
+{
+    public class Office11Renderer : AbstractRenderer
+    {
+        protected override void Dispose(bool mainThread)
+        {
+            base.Dispose(mainThread);
+
+            if (minuteFont != null)
+                minuteFont.Dispose();
+        }
+
+        private Font minuteFont;
+
+        public override Font MinuteFont
+        {
+            get
+            {
+                if (minuteFont == null)
+                    minuteFont = new Font(BaseFont, FontStyle.Italic);
+
+                return minuteFont;
+            }
+        }
+
+		public override void DrawHourLabel(System.Drawing.Graphics g, System.Drawing.Rectangle rect, int hour, bool ampm)
+		{
+			DrawHourLabel(g, rect, hour, ampm, false);
+		}
+
+		public override void DrawHourLabel(Graphics g, Rectangle rect, int hour, bool ampm, bool timeindicator)
+        {
+            if (g == null)
+                throw new ArgumentNullException("g");
+
+            Color m_Color = ControlPaint.LightLight(SystemColors.WindowFrame);
+            m_Color = ControlPaint.Light(m_Color);
+
+            using (Pen m_Pen = new Pen(m_Color))
+                g.DrawLine(m_Pen, rect.Left, rect.Y, rect.Width, rect.Y);
+
+            g.DrawString(hour.ToString("##00", System.Globalization.CultureInfo.InvariantCulture), HourFont, SystemBrushes.ControlText, rect);
+
+            rect.X += 27;
+
+            g.DrawString("00", MinuteFont, SystemBrushes.ControlText, rect);
+        }
+
+        public override void DrawDayHeader(Graphics g, Rectangle rect, DateTime date)
+        {
+            if (g == null)
+                throw new ArgumentNullException("g");
+
+            using (StringFormat format = new StringFormat())
+            {
+                format.Alignment = StringAlignment.Center;
+                format.FormatFlags = StringFormatFlags.NoWrap;
+                format.LineAlignment = StringAlignment.Center;
+
+                ControlPaint.DrawButton(g, rect, ButtonState.Inactive);
+                ControlPaint.DrawBorder3D(g, rect, Border3DStyle.Etched);
+
+                g.DrawString(
+                    System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(date.DayOfWeek),
+                    BaseFont,
+                    SystemBrushes.WindowText,
+                    rect,
+                    format
+                    );
+            }
+        }
+
+        public override void DrawDayBackground(Graphics g, Rectangle rect)
+        {
+            if (g == null)
+                throw new ArgumentNullException("g");
+
+            using (Brush m_Brush = new SolidBrush(this.HourColor))
+                g.FillRectangle(m_Brush, rect);
+        }
+
+        public override void DrawAppointment(Graphics g, Rectangle rect, Appointment appointment, bool isSelected, Rectangle gripRect)
+        {
+			DrawAppointment(g, rect, appointment, isSelected, gripRect, true, false);
+        }
+
+		public override void DrawAppointment(Graphics g, Rectangle rect, Appointment appointment, bool isSelected, Rectangle gripRect, bool enableShadows, bool useroundedCorners)
+		{
+			if (appointment == null)
+				throw new ArgumentNullException("appointment");
+
+			if (g == null)
+				throw new ArgumentNullException("g");
+
+			if (rect.Width != 0 && rect.Height != 0)
+				using (StringFormat format = new StringFormat())
+				{
+					format.Alignment = StringAlignment.Near;
+					format.LineAlignment = StringAlignment.Near;
+
+					if ((appointment.Locked) && isSelected)
+					{
+						// Draw back
+						using (Brush m_Brush = new System.Drawing.Drawing2D.HatchBrush(System.Drawing.Drawing2D.HatchStyle.Wave, Color.LightGray, appointment.Color))
+							g.FillRectangle(m_Brush, rect);
+					}
+					else
+					{
+						// Draw back
+						using (SolidBrush m_Brush = new SolidBrush(appointment.Color))
+							g.FillRectangle(m_Brush, rect);
+					}
+
+					if (isSelected)
+					{
+						using (Pen m_Pen = new Pen(appointment.BorderColor, 4))
+							g.DrawRectangle(m_Pen, rect);
+
+						Rectangle m_BorderRectangle = rect;
+
+						m_BorderRectangle.Inflate(2, 2);
+
+						using (Pen m_Pen = new Pen(SystemColors.WindowFrame, 1))
+							g.DrawRectangle(m_Pen, m_BorderRectangle);
+
+						m_BorderRectangle.Inflate(-4, -4);
+
+						using (Pen m_Pen = new Pen(SystemColors.WindowFrame, 1))
+							g.DrawRectangle(m_Pen, m_BorderRectangle);
+					}
+					else
+					{
+						// Draw gripper
+						gripRect.Width += 1;
+
+						using (SolidBrush m_Brush = new SolidBrush(appointment.BorderColor))
+							g.FillRectangle(m_Brush, gripRect);
+
+						using (Pen m_Pen = new Pen(SystemColors.WindowFrame, 1))
+							g.DrawRectangle(m_Pen, rect);
+					}
+
+					rect.X += gripRect.Width;
+					g.DrawString(appointment.Subject, this.BaseFont, SystemBrushes.WindowText, rect, format);
+				}
+		}
+    }
+
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Renderer/Office12Renderer.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Renderer/Office12Renderer.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Renderer/Office12Renderer.cs	(revision 4105)
@@ -0,0 +1,411 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Drawing.Text;
+
+namespace HeuristicLab.Calendar
+{
+    public class Office12Renderer : AbstractRenderer
+    {
+        protected override void Dispose(bool mainThread)
+        {
+            base.Dispose(mainThread);
+
+            if (baseFont != null)
+                baseFont.Dispose();
+        }
+
+        Font baseFont;
+
+        public override Font BaseFont
+        {
+            get
+            {
+                if (baseFont == null)
+                {
+                    baseFont = new Font("Segoe UI", 8, FontStyle.Regular);
+                }
+
+                return baseFont;
+            }
+        }
+
+        public override Color HourColor
+        {
+            get
+            {
+                return System.Drawing.Color.FromArgb(230, 237, 247);
+            }
+        }
+
+        public override Color HalfHourSeperatorColor
+        {
+            get
+            {
+                return System.Drawing.Color.FromArgb(165, 191, 225);
+            }
+        }
+
+        public override Color HourSeperatorColor
+        {
+            get
+            {
+                return System.Drawing.Color.FromArgb(213, 215, 241);
+            }
+        }
+
+        public override Color WorkingHourColor
+        {
+            get
+            {
+                return System.Drawing.Color.FromArgb(255, 255, 255);
+            }
+        }
+
+        public override System.Drawing.Color BackColor
+        {
+            get
+            {
+                return Color.FromArgb(213, 228, 242);
+            }
+        }
+
+        public override Color SelectionColor
+        {
+            get
+            {
+                return System.Drawing.Color.FromArgb(41, 76, 122);
+            }
+        }
+
+		public override void DrawHourLabel(System.Drawing.Graphics g, System.Drawing.Rectangle rect, int hour, bool ampm)
+		{
+			DrawHourLabel(g, rect, hour, ampm, false);
+		}
+
+		public override void DrawHourLabel(Graphics g, Rectangle rect, int hour, bool ampm, bool timeindicator)
+		{
+			if (g == null)
+				throw new ArgumentNullException("g");
+
+			int orgHour = hour;
+			Color color = Color.FromArgb(101, 147, 207);
+
+			//Draw Divider Line
+			using (Pen pen = new Pen(color))
+				g.DrawLine(pen, rect.Left, rect.Y, rect.Width, rect.Y);
+
+			string ampmtime;
+			if (ampm)
+			{
+				ampmtime = (hour < 12) ? "AM" : "PM";
+
+				if (hour != 12)
+					hour = hour % 12;
+			}
+			else
+				ampmtime = "00";
+			
+			using (SolidBrush brush = new SolidBrush(color))
+			{
+				g.DrawString(hour.ToString("##00", System.Globalization.CultureInfo.InvariantCulture), HourFont, brush, rect);
+				rect.X += 27;
+				g.DrawString(ampmtime, MinuteFont, brush, rect);
+			}
+
+			DateTime dtnow = DateTime.Now;
+			if (timeindicator && orgHour == dtnow.Hour)
+			{
+				int tioffset = 5;
+				Rectangle rectIndicator = rect;
+				rectIndicator.Width = rect.Width - tioffset;
+				rectIndicator.Height = tioffset;
+				rectIndicator.Y = (rect.Height / 60) * dtnow.Minute;
+				rectIndicator.X = tioffset;
+				using (LinearGradientBrush lgb = new LinearGradientBrush(rectIndicator, Color.FromArgb(247, 207, 114), Color.FromArgb(251, 230, 148), LinearGradientMode.Vertical))
+					g.FillRectangle(lgb, rectIndicator);
+			}
+		}
+
+        public override void DrawDayHeader(System.Drawing.Graphics g, System.Drawing.Rectangle rect, DateTime date)
+        {
+            if (g == null)
+                throw new ArgumentNullException("g");
+
+            using (StringFormat format = new StringFormat())
+            {
+                format.Alignment = StringAlignment.Center;
+                format.FormatFlags = StringFormatFlags.NoWrap;
+                format.LineAlignment = StringAlignment.Center;
+
+                using (StringFormat formatdd = new StringFormat())
+                {
+                    formatdd.Alignment = StringAlignment.Near;
+                    formatdd.FormatFlags = StringFormatFlags.NoWrap;
+                    formatdd.LineAlignment = StringAlignment.Center;
+
+                    using (SolidBrush brush = new SolidBrush(this.BackColor))
+                        g.FillRectangle(brush, rect);
+
+                    using (Pen aPen = new Pen(Color.FromArgb(205, 219, 238)))
+                        g.DrawLine(aPen, rect.Left, rect.Top + (int)rect.Height / 2, rect.Right, rect.Top + (int)rect.Height / 2);
+
+                    using (Pen aPen = new Pen(Color.FromArgb(141, 174, 217)))
+                        g.DrawRectangle(aPen, rect);
+
+                    Rectangle topPart = new Rectangle(rect.Left + 1, rect.Top + 1, rect.Width - 2, (int)(rect.Height / 2) - 1);
+                    Rectangle lowPart = new Rectangle(rect.Left + 1, rect.Top + (int)(rect.Height / 2) + 1, rect.Width - 1, (int)(rect.Height / 2) - 1);
+
+                    using (LinearGradientBrush aGB = new LinearGradientBrush(topPart, Color.FromArgb(228, 236, 246), Color.FromArgb(214, 226, 241), LinearGradientMode.Vertical))
+                        g.FillRectangle(aGB, topPart);
+
+                    using (LinearGradientBrush aGB = new LinearGradientBrush(lowPart, Color.FromArgb(194, 212, 235), Color.FromArgb(208, 222, 239), LinearGradientMode.Vertical))
+                        g.FillRectangle(aGB, lowPart);
+
+                    if (date.Date.Equals(DateTime.Now.Date))
+                    {
+                        topPart.Inflate((int)(-topPart.Width / 4 + 1), 1); //top left orange area
+                        topPart.Offset(rect.Left - topPart.Left + 1, 1);
+                        topPart.Inflate(1, 0);
+                        using (LinearGradientBrush aGB = new LinearGradientBrush(topPart, Color.FromArgb(247, 207, 114), Color.FromArgb(251, 230, 148), LinearGradientMode.Horizontal))
+                        {
+                            topPart.Inflate(-1, 0);
+                            g.FillRectangle(aGB, topPart);
+                        }
+
+                        topPart.Offset(rect.Right - topPart.Right, 0);        //top right orange
+                        topPart.Inflate(1, 0);
+                        using (LinearGradientBrush aGB = new LinearGradientBrush(topPart, Color.FromArgb(251, 230, 148), Color.FromArgb(247, 207, 114), LinearGradientMode.Horizontal))
+                        {
+                            topPart.Inflate(-1, 0);
+                            g.FillRectangle(aGB, topPart);
+                        }
+
+                        using (Pen aPen = new Pen(Color.FromArgb(128, 240, 154, 30))) //center line
+                            g.DrawLine(aPen, rect.Left, topPart.Bottom - 1, rect.Right, topPart.Bottom - 1);
+
+                        topPart.Inflate(0, -1);
+                        topPart.Offset(0, topPart.Height + 1); //lower right
+                        using (LinearGradientBrush aGB = new LinearGradientBrush(topPart, Color.FromArgb(240, 157, 33), Color.FromArgb(250, 226, 142), LinearGradientMode.BackwardDiagonal))
+                            g.FillRectangle(aGB, topPart);
+
+                        topPart.Offset(rect.Left - topPart.Left + 1, 0); //lower left
+                        using (LinearGradientBrush aGB = new LinearGradientBrush(topPart, Color.FromArgb(240, 157, 33), Color.FromArgb(250, 226, 142), LinearGradientMode.ForwardDiagonal))
+                            g.FillRectangle(aGB, topPart);
+                        using (Pen aPen = new Pen(Color.FromArgb(238, 147, 17)))
+                            g.DrawRectangle(aPen, rect);
+                    }
+
+                    g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
+
+                    //get short dayabbr. if narrow dayrect
+                    string sTodaysName = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(date.DayOfWeek);
+                    if (rect.Width < 105)
+                        sTodaysName = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetAbbreviatedDayName(date.DayOfWeek);
+
+                    rect.Offset(2, 1);
+
+                    using (Font fntDay = new Font("Segoe UI", 8))
+                        g.DrawString(sTodaysName, fntDay, SystemBrushes.WindowText, rect, format);
+
+                    rect.Offset(-2, -1);
+
+                    using (Font fntDayDate = new Font("Segoe UI", 9, FontStyle.Bold))
+                        g.DrawString(date.ToString(" d"), fntDayDate, SystemBrushes.WindowText, rect, formatdd);
+                }
+            }
+        }
+
+        public override void DrawDayBackground(System.Drawing.Graphics g, System.Drawing.Rectangle rect)
+        {
+
+        }
+
+		public override void DrawAppointment(System.Drawing.Graphics g, System.Drawing.Rectangle rect, Appointment appointment, bool isSelected, System.Drawing.Rectangle gripRect)
+		{
+			DrawAppointment(g, rect, appointment, isSelected, gripRect, true, false);
+		}
+        
+		public override void DrawAppointment(System.Drawing.Graphics g, System.Drawing.Rectangle rect, Appointment appointment, bool isSelected, System.Drawing.Rectangle gripRect, bool enableShadows, bool useroundedCorners)
+        {
+            if (appointment == null)
+                throw new ArgumentNullException("appointment");
+
+            if (g == null)
+                throw new ArgumentNullException("g");
+
+			if (rect.Width == 0 || rect.Height == 0)
+				return;
+
+			float _ShadowDistance = 6f;
+
+			#region " Adjust Appointment Rectangle based on the Size of the Grip Rectangle "
+			rect.X += gripRect.Width;
+			rect.Width -= gripRect.Width;
+			gripRect.X += gripRect.Width;
+			#endregion
+
+			#region " Gradient Colors "
+			Color start = InterpolateColors(appointment.Color, Color.White, 0.4f);
+			Color end = InterpolateColors(appointment.Color, Color.FromArgb(191, 210, 234), 0.7f);
+			//start = Color.FromArgb(230, start);
+			//end = Color.FromArgb(180, end);
+			#endregion
+
+			GraphicsPath gp = null;
+			try
+			{
+				#region " Create Graphics Path "
+				if (useroundedCorners)
+				{
+					gp = CreateRoundRectangle(rect);
+				}
+				else
+				{
+					gp = new GraphicsPath();
+					gp.AddRectangle(rect);
+				}
+				#endregion
+
+				#region " Shadows "
+				if (enableShadows)
+				{
+					Matrix _Matrix = new Matrix();
+					_Matrix.Translate(_ShadowDistance, _ShadowDistance);
+					gp.Transform(_Matrix);
+					using (PathGradientBrush _Brush = new PathGradientBrush(gp))
+					{
+						// set the wrapmode so that the colors will layer themselves
+						// from the outer edge in
+						_Brush.WrapMode = WrapMode.Clamp;
+						
+						// Create a color blend to manage our colors and positions and
+						// since we need 3 colors set the default length to 3
+						ColorBlend _ColorBlend = new ColorBlend(3);
+
+						// here is the important part of the shadow making process, remember
+						// the clamp mode on the colorblend object layers the colors from
+						// the outside to the center so we want our transparent color first
+						// followed by the actual shadow color. Set the shadow color to a 
+						// slightly transparent DimGray, I find that it works best.
+						_ColorBlend.Colors = new Color[] { Color.Transparent, Color.FromArgb(180, Color.DimGray), Color.FromArgb(180, Color.DimGray) };
+
+						// our color blend will control the distance of each color layer
+						// we want to set our transparent color to 0 indicating that the 
+						// transparent color should be the outer most color drawn, then
+						// our Dimgray color at about 10% of the distance from the edge
+						_ColorBlend.Positions = new float[] { 0f, .1f, 1f };
+						
+						// assign the color blend to the pathgradientbrush
+						_Brush.InterpolationColors = _ColorBlend;
+						
+						// fill the shadow with our pathgradientbrush
+						g.FillPath(_Brush, gp);
+					}
+
+					// Draw shadow lines
+					//int xLeft = rect.X + 6;
+					//int xRight = rect.Right + 1;
+					//int yTop = rect.Y + 1;
+					//int yButton = rect.Bottom + 1;
+
+					//for (int i = 0; i < 5; i++)
+					//{
+					//    using (Pen shadow_Pen = new Pen(Color.FromArgb(70 - 12 * i, Color.Black)))
+					//    {
+					//        g.DrawLine(shadow_Pen, xLeft + i, yButton + i, xRight + i - 1, yButton + i); //horisontal lines
+					//        g.DrawLine(shadow_Pen, xRight + i, yTop + i, xRight + i, yButton + i); //vertical
+					//    }
+					//}
+
+					//Move the GraphicsPath Back to the original Location
+					_Matrix.Translate(_ShadowDistance * -2, _ShadowDistance * -2);
+					gp.Transform(_Matrix);
+				}
+				#endregion
+
+				#region " Draw Background "
+					using (LinearGradientBrush aGB = new LinearGradientBrush(rect, start, end, LinearGradientMode.Vertical))
+						g.FillPath(aGB, gp);
+				#endregion
+
+				#region " Selection Border "
+				if (isSelected)
+				{
+					using (Pen m_Pen = new Pen(appointment.BorderColor, 2))
+						g.DrawPath(m_Pen, gp);
+				}
+				#endregion
+
+				#region " Appointment Grip "
+				gripRect.Width += 1;
+
+				GraphicsPath grippath = null;
+				try
+				{
+					if (useroundedCorners)
+					{
+						grippath = CreateGripRectangle(gripRect);
+					}
+					else
+					{
+						grippath = new GraphicsPath();
+						grippath.AddRectangle(gripRect);
+					}
+					using (SolidBrush aGB = new SolidBrush(appointment.BorderColor))
+						g.FillPath(aGB, grippath);
+				}
+				finally
+				{
+					grippath.Dispose();
+				}
+
+				#endregion
+
+				#region " Appointment Border
+				if (appointment.DrawBorder)
+					using (Pen m_Pen = new Pen(appointment.BorderColor, 1))
+						g.DrawPath(m_Pen, gp);
+				#endregion
+
+				#region " Draw Recurring Icon "
+				if (appointment.Recurring || appointment.Locked)
+				{
+					Rectangle iconrec = rect;
+					iconrec.Width = 16;
+					iconrec.Height = 16;
+
+					iconrec.X = rect.Right - 18;
+					iconrec.Y = rect.Bottom - 18;
+					Image icon = (appointment.Recurring) ? Properties.CalendarResources.recurring : null;
+          if (icon != null) {
+            g.DrawImage(icon, iconrec);
+            icon.Dispose();
+          }
+				}
+				#endregion
+
+			}
+			finally
+			{
+				gp.Dispose();
+			}
+			
+			#region " Draw Text "
+			using (StringFormat format = new StringFormat())
+			{
+				format.Alignment = StringAlignment.Near;
+				format.LineAlignment = StringAlignment.Near;
+				// draw appointment text
+
+				rect.X += gripRect.Width;
+				g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
+				g.DrawString(appointment.Subject, this.BaseFont, SystemBrushes.WindowText, rect, format);
+				g.TextRenderingHint = TextRenderingHint.SystemDefault;
+			}
+			#endregion
+		}
+    }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/DrawTool.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/DrawTool.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/DrawTool.cs	(revision 4105)
@@ -0,0 +1,93 @@
+
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+
+namespace HeuristicLab.Calendar
+{
+    public class DrawTool : ITool
+    {
+        DateTime m_SelectionStart;
+        bool m_SelectionStarted;
+
+        public void Reset()
+        {
+            m_SelectionStarted = false;
+        }
+
+        public void MouseMove(MouseEventArgs e)
+        {
+            if (e == null)
+                throw new ArgumentNullException("e");
+
+            if (e.Button == MouseButtons.Left)
+            {
+                if (m_SelectionStarted)
+                {
+                    DateTime m_Time = m_DayView.GetTimeAt(e.X, e.Y);
+                    m_Time = m_Time.AddMinutes(30);
+
+                    if (m_Time < m_SelectionStart)
+                    {
+                        m_DayView.SelectionStart = m_Time;
+                        m_DayView.SelectionEnd = m_SelectionStart;
+                    }
+                    else
+                    {
+                        m_DayView.SelectionEnd = m_Time;
+                    }
+
+                    m_DayView.Invalidate();
+                }
+            }
+        }
+
+        public void MouseUp(MouseEventArgs e)
+        {
+            if (e == null)
+                throw new ArgumentNullException("e");
+
+            if (e.Button == MouseButtons.Left)
+            {
+                m_DayView.Capture = false;
+                m_SelectionStarted = false;
+
+                m_DayView.RaiseSelectionChanged(EventArgs.Empty);
+
+                if (Complete != null)
+                    Complete(this, EventArgs.Empty);
+            }
+        }
+
+        public void MouseDown(MouseEventArgs e)
+        {
+            if (e == null)
+                throw new ArgumentNullException("e");
+
+            if (e.Button == MouseButtons.Left)
+            {
+                m_SelectionStart = m_DayView.GetTimeAt(e.X, e.Y);
+
+                m_DayView.SelectionStart = m_SelectionStart;
+                m_DayView.SelectionEnd = m_SelectionStart.AddMinutes(30);
+
+                m_SelectionStarted = true;
+
+                m_DayView.Invalidate();
+                m_DayView.Capture = true;
+            }
+        }
+
+        private DayView m_DayView;
+
+        public DayView DayView
+        {
+            get { return m_DayView; }
+            set { m_DayView = value; }
+        }
+
+        public event EventHandler Complete;
+    }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/ITool.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/ITool.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/ITool.cs	(revision 4105)
@@ -0,0 +1,24 @@
+
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+
+namespace HeuristicLab.Calendar
+{
+    public interface ITool
+    {
+        DayView DayView
+        {
+            get;
+            set;
+        }
+
+        void Reset();
+
+        void MouseMove( MouseEventArgs e );
+        void MouseUp( MouseEventArgs e );
+        void MouseDown( MouseEventArgs e );
+    }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/SelectionTool.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/SelectionTool.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/SelectionTool.cs	(revision 4105)
@@ -0,0 +1,289 @@
+
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Drawing;
+
+namespace HeuristicLab.Calendar
+{
+    public class SelectionTool : ITool
+    {
+        private DayView dayView;
+
+        public DayView DayView
+        {
+            get
+            {
+                return dayView;
+            }
+            set
+            {
+                dayView = value;
+            }
+        }
+
+        private DateTime startDate;
+        private TimeSpan length;
+        private Mode mode;
+        private TimeSpan delta;
+
+        public void Reset()
+        {
+            length = TimeSpan.Zero;
+            delta = TimeSpan.Zero;
+        }
+
+        public void MouseMove(System.Windows.Forms.MouseEventArgs e)
+        {
+            if (e == null)
+                throw new ArgumentNullException("e");
+
+            Appointment selection = dayView.SelectedAppointment;
+            Rectangle viewrect = dayView.GetTrueRectangle();
+            Rectangle fdrect = dayView.GetFullDayApptsRectangle();
+
+            if (viewrect.Contains(e.Location) || fdrect.Contains(e.Location))
+            {
+                if ((selection != null) && (!selection.Locked))
+                {
+                    switch (e.Button)
+                    {
+                    case System.Windows.Forms.MouseButtons.Left:
+
+                        // Get time at mouse position
+                        DateTime m_Date = dayView.GetTimeAt(e.X, e.Y);
+
+                        switch (mode)
+                        {
+                            case Mode.Move:
+
+                                    // This works for regular (i.e. non full-day or multi-day appointments)
+
+                                    if (!selection.AllDayEvent && viewrect.Contains(e.Location))
+                                    {
+                                // add delta value
+                                m_Date = m_Date.Add(delta);
+
+                                if (length == TimeSpan.Zero)
+                                {
+                                    startDate = selection.StartDate;
+                                    length = selection.EndDate - startDate;
+                                }
+                                else
+                                {
+                                    DateTime m_EndDate = m_Date.Add(length);
+
+                                            if (m_EndDate.Day == m_Date.Day)
+                                            {
+                                                selection.StartDate = m_Date;
+                                                selection.EndDate = m_EndDate;
+                                                dayView.Invalidate();
+                                                dayView.RaiseAppointmentMove(new AppointmentEventArgs(selection));
+                                            }
+                                        }
+                                    }
+                                    else
+                                    {
+                                        if (fdrect.Contains(e.Location))
+                                        {
+                                            m_Date = m_Date.Add(delta);
+
+                                            int m_DateDiff = m_Date.Subtract(selection.StartDate).Days;
+
+                                            if (m_DateDiff != 0)
+                                            {
+                                                if (selection.StartDate.AddDays(m_DateDiff) > dayView.StartDate)
+                                                {
+                                                    selection.StartDate = selection.StartDate.AddDays(m_DateDiff);
+                                                    selection.EndDate = selection.EndDate.AddDays(m_DateDiff);
+                                                    dayView.Invalidate();
+                                                    dayView.RaiseAppointmentMove(new AppointmentEventArgs(selection));
+                                                }
+                                            }
+                                        }
+                                    }
+
+                                    break;
+
+                                case Mode.ResizeBottom:
+
+                                    if (m_Date > selection.StartDate)
+                                    {
+                                        if (selection.EndDate.Day == m_Date.Day)
+                                        {
+                                            selection.EndDate = m_Date;
+                                            dayView.Invalidate();
+                                            dayView.RaiseAppointmentMove(new AppointmentEventArgs(selection));
+                                        }
+                                    }
+
+                                    break;
+
+                                case Mode.ResizeTop:
+
+                                    if (m_Date < selection.EndDate)
+                                    {
+                                        if (selection.StartDate.Day == m_Date.Day)
+                                        {
+                                            selection.StartDate = m_Date;
+                                            dayView.Invalidate();
+                                            dayView.RaiseAppointmentMove(new AppointmentEventArgs(selection));
+                                        }
+                                    }
+                                    break;
+
+                                case Mode.ResizeLeft:
+                                    if (m_Date.Date < selection.EndDate.Date)
+                                    {
+                                        selection.StartDate = m_Date.Date;
+                                        dayView.Invalidate();
+                                        dayView.RaiseAppointmentMove(new AppointmentEventArgs(selection));
+                                    }
+                                    break;
+
+                                case Mode.ResizeRight:
+                                    if (m_Date.Date >= selection.StartDate.Date)
+                                    {
+                                        selection.EndDate = m_Date.Date.AddDays(1);
+                                        dayView.Invalidate();
+                                        dayView.RaiseAppointmentMove(new AppointmentEventArgs(selection));
+                                    }
+                                    break;
+                            }
+
+                            break;
+
+                        default:
+
+                            Mode tmpNode = GetMode(e);
+
+                            switch (tmpNode)
+                            {
+                                case Mode.Move:
+                                    dayView.Cursor = System.Windows.Forms.Cursors.Default;
+                                    break;
+                                case Mode.ResizeBottom:
+                                case Mode.ResizeTop:
+                                    if (!selection.AllDayEvent)
+                                        dayView.Cursor = System.Windows.Forms.Cursors.SizeNS;
+                                    break;
+                                case Mode.ResizeLeft: // changed by Gimlei
+                                case Mode.ResizeRight:
+                                    if (selection.AllDayEvent)
+                                        DayView.Cursor = System.Windows.Forms.Cursors.SizeWE;
+                                    break;
+                            }
+
+                            break;
+                    }
+                }
+            }
+        }
+
+        private Mode GetMode(System.Windows.Forms.MouseEventArgs e)
+        {
+            DayView.AppointmentView view = null;
+            Boolean gotview = false;
+
+            if (dayView.SelectedAppointment == null)
+                return Mode.None;
+
+            if (dayView.appointmentViews.ContainsKey(dayView.SelectedAppointment))
+            {
+                view = dayView.appointmentViews[dayView.SelectedAppointment];
+                gotview = true;
+            }
+
+            else if (dayView.longappointmentViews.ContainsKey(dayView.SelectedAppointment))
+            {
+                view = dayView.longappointmentViews[dayView.SelectedAppointment];
+                gotview = true;
+            }
+
+            if (gotview)
+            {
+                Rectangle topRect = view.Rectangle;
+                Rectangle bottomRect = view.Rectangle;
+                Rectangle leftRect = view.Rectangle;
+                Rectangle rightRect = view.Rectangle;
+
+                bottomRect.Y = bottomRect.Bottom - 5;
+                bottomRect.Height = 5;
+                topRect.Height = 5;
+                leftRect.Width = 5;
+                rightRect.X += rightRect.Width - 5;
+                rightRect.Width = 5;
+
+                if (topRect.Contains(e.Location))
+                    return Mode.ResizeTop;
+                else if (bottomRect.Contains(e.Location))
+                    return Mode.ResizeBottom;
+                else if (rightRect.Contains(e.Location)) // changed by Gimlei
+                    return Mode.ResizeRight;
+                else if (leftRect.Contains(e.Location))
+                    return Mode.ResizeLeft;
+                else
+                    return Mode.Move;
+            }
+
+            return Mode.None;
+        }
+
+        public void MouseUp(System.Windows.Forms.MouseEventArgs e)
+        {
+            if (e == null)
+                throw new ArgumentNullException("e");
+
+            if (e.Button == System.Windows.Forms.MouseButtons.Left)
+            {
+                if (Complete != null)
+                    Complete(this, EventArgs.Empty);
+            }
+
+            dayView.RaiseSelectionChanged(EventArgs.Empty);
+
+            mode = Mode.Move;
+
+            delta = TimeSpan.Zero;
+        }
+
+        public void MouseDown(System.Windows.Forms.MouseEventArgs e)
+        {
+            if (dayView.SelectedAppointmentIsNew)
+            {
+                dayView.RaiseNewAppointment();
+            }
+
+            if (dayView.CurrentlyEditing)
+                dayView.FinishEditing(false);
+
+            mode = GetMode(e);
+
+            if (dayView.SelectedAppointment != null)
+            {
+                DateTime downPos = dayView.GetTimeAt(e.X, e.Y);
+                // Calculate delta time between selection and clicked point
+                delta = dayView.SelectedAppointment.StartDate - downPos;
+            }
+            else
+            {
+                delta = TimeSpan.Zero;
+            }
+
+            length = TimeSpan.Zero;
+        }
+
+        public event EventHandler Complete;
+
+        enum Mode
+        {
+            ResizeTop,
+            ResizeBottom,
+            ResizeLeft,
+            ResizeRight,
+            Move,
+            None
+        }
+    }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/SelectionType.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/SelectionType.cs	(revision 4105)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/ViewTools/SelectionType.cs	(revision 4105)
@@ -0,0 +1,15 @@
+
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeuristicLab.Calendar
+{
+    public enum SelectionType
+    {
+        DateRange,
+        Appointment,
+        None
+    }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive 3.3.sln
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive 3.3.sln	(revision 4104)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive 3.3.sln	(revision 4105)
@@ -15,4 +15,6 @@
 		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C} = {CE2DFB48-6A9C-4507-96C6-5FC40E92035C}
 		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B} = {5CDACE54-5FB2-4344-A21C-963F63CB7C2B}
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD} = {D17A4D6A-4CAA-4470-8A19-F42463C021FD}
+		{42A1D075-6C12-4DD9-B0C2-C6F5210A8119} = {42A1D075-6C12-4DD9-B0C2-C6F5210A8119}
 		{679E977A-117B-456E-8594-2A4DEADB658B} = {679E977A-117B-456E-8594-2A4DEADB658B}
 		{9076697B-C151-46CD-95BC-1D059492B478} = {9076697B-C151-46CD-95BC-1D059492B478}
@@ -86,4 +88,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Hive.Server.Tests", "HeuristicLab.Hive.Server.Tests\HeuristicLab.Hive.Server.Tests.csproj", "{55B89815-F3E7-4D09-9442-273F849141DD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Calendar-3.3", "HeuristicLab.Calendar\3.3\HeuristicLab.Calendar-3.3.csproj", "{D17A4D6A-4CAA-4470-8A19-F42463C021FD}"
 EndProject
 Global
@@ -446,4 +450,16 @@
 		{55B89815-F3E7-4D09-9442-273F849141DD}.Release|x86.ActiveCfg = Release|x86
 		{55B89815-F3E7-4D09-9442-273F849141DD}.Release|x86.Build.0 = Release|x86
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Release|x64.ActiveCfg = Release|Any CPU
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
@@ -472,4 +488,5 @@
 		{9076697B-C151-46CD-95BC-1D059492B478} = {BD1DE6F6-A188-4D1F-9681-BA7104818370}
 		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B} = {BD1DE6F6-A188-4D1F-9681-BA7104818370}
+		{D17A4D6A-4CAA-4470-8A19-F42463C021FD} = {BD1DE6F6-A188-4D1F-9681-BA7104818370}
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1} = {98B4B360-4F14-4BC5-92F2-9B81F6C712DA}
 		{55B89815-F3E7-4D09-9442-273F849141DD} = {4F2D8149-D608-42B3-BB1C-6909BDA2B350}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/AddJobForm.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/AddJobForm.cs	(revision 4104)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/AddJobForm.cs	(revision 4105)
@@ -129,8 +129,9 @@
             }
 
-            SerializedJob computableJob =
-              new SerializedJob();
+            SerializedJob computableJob = new SerializedJob();
             computableJob.JobInfo = job;
-            computableJob.SerializedJobData = PersistenceManager.SaveToGZip(new TestJob());
+
+            // [chn] TODO: persist to zip
+            // computableJob.SerializedJobData = PersistenceManager.SaveToGZip(new TestJob());
             Response resp = jobManager.AddNewJob(computableJob);
           }
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/CgCalendar.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/CgCalendar.cs	(revision 4104)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/CgCalendar.cs	(revision 4105)
@@ -8,5 +8,5 @@
 using System.Windows.Forms;
 using System.Xml.Serialization;
-using Calendar;
+using HeuristicLab.Calendar;
 using HeuristicLab.Hive.Client.Console;
 using HeuristicLab.Hive.Contracts.BusinessObjects;
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/HeuristicLab.Hive.Server.Console-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/HeuristicLab.Hive.Server.Console-3.3.csproj	(revision 4104)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/HeuristicLab.Hive.Server.Console-3.3.csproj	(revision 4105)
@@ -84,4 +84,7 @@
       <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     </Reference>
+    <Reference Include="HeuristicLab.Tracing-3.3">
+      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Tracing-3.3.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core">
@@ -225,4 +228,12 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Calendar\3.3\HeuristicLab.Calendar-3.3.csproj">
+      <Project>{D17A4D6A-4CAA-4470-8A19-F42463C021FD}</Project>
+      <Name>HeuristicLab.Calendar-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.DataAccess\3.3\HeuristicLab.DataAccess-3.3.csproj">
+      <Project>{9076697B-C151-46CD-95BC-1D059492B478}</Project>
+      <Name>HeuristicLab.DataAccess-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Hive.Contracts\3.3\HeuristicLab.Hive.Contracts-3.3.csproj">
       <Project>{134F93D7-E7C8-4ECD-9923-7F63259A60D8}</Project>
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/HiveServerConsolePlugin.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/HiveServerConsolePlugin.cs	(revision 4104)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/HiveServerConsolePlugin.cs	(revision 4105)
@@ -27,7 +27,11 @@
 
 namespace HeuristicLab.Grid {
-  [Plugin("HeuristicLab.Hive.Server.Console-3.3")]
+  [Plugin("HeuristicLab.Hive.Server.Console", "3.3")]
   [PluginFile("HeuristicLab.Hive.Server.Console-3.3.dll", PluginFileType.Assembly)]
-  [PluginDependency("HeuristicLab.Core-3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Calendar", "3.3")]
+  [PluginDependency("HeuristicLab.Hive.Contracts", "3.3")]
+  [PluginDependency("HeuristicLab.Tracing", "3.3")]
+  [PluginDependency("HeuristicLab.Hive.JobBase", "3.3")]
   public class HeuristicLabHiveClientConsolePlugin : PluginBase {
   }
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Properties/AssemblyInfo.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Properties/AssemblyInfo.cs	(revision 4104)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Properties/AssemblyInfo.cs	(revision 4105)
@@ -55,5 +55,5 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.3.0.4091")]
-[assembly: AssemblyFileVersion("3.3.0.4091")]
-[assembly: AssemblyBuildDate("2010/07/23 14:14:54")]
+[assembly: AssemblyVersion("3.3.0.4092")]
+[assembly: AssemblyFileVersion("3.3.0.4092")]
+[assembly: AssemblyBuildDate("2010/07/26 09:32:07")]
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/Properties/AssemblyInfo.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/Properties/AssemblyInfo.cs	(revision 4104)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/Properties/AssemblyInfo.cs	(revision 4105)
@@ -51,4 +51,4 @@
 //      Revision
 //
-[assembly: AssemblyVersion("3.3.0.4091")]
-[assembly: AssemblyFileVersion("3.3.0.4091")]
+[assembly: AssemblyVersion("3.3.0.4092")]
+[assembly: AssemblyFileVersion("3.3.0.4092")]
