Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls

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

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

	End Sub
	Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
		Dim hourHeight As Integer = Convert.ToInt32(DropDownList1.SelectedValue)
		DayPilotCalendar1.CellHeight = hourHeight
		checkReadability()
	End Sub
	Protected Sub DropDownList2_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
		Dim cellDuration As Integer = Convert.ToInt32(DropDownList2.SelectedValue)
		DayPilotCalendar1.CellDuration = cellDuration
		checkReadability()
	End Sub

	Private Sub checkReadability()
		If DayPilotCalendar1.CellDuration = 60 Then
			DayPilotCalendar1.CellHeight = 25
			DropDownList1.SelectedValue = "25"
			DropDownList1.Enabled = False
		Else
			DropDownList1.Enabled = True
		End If

	End Sub
End Class
