Imports System
Imports System.Data
Imports System.Drawing
Imports DayPilot.Web.Ui.Events

Partial Public Class DurationBar
	Inherits System.Web.UI.Page

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
		If Not IsPostBack Then
			If Session("EventLeftBar") Is Nothing Then
				Session("EventLeftBar") = DataGeneratorCalendar.GetData()
			End If

			DayPilotCalendar1.DataSource = Session("EventLeftBar")
			DataBind()
		End If

	End Sub
	Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
		Select Case DropDownList1.SelectedValue
			Case "hidden"
				DayPilotCalendar1.DurationBarVisible = False
			Case "default"
				DayPilotCalendar1.DurationBarVisible = True
		End Select

		DayPilotCalendar1.DataSource = Session("EventLeftBar")
		DataBind()


	End Sub
End Class
