Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text

Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base
Imports DevExpress.ExpressApp.Scheduler.Web
Imports DevExpress.XtraScheduler
Imports DevExpress.Web.ASPxScheduler

Public Class MySchedule_VC
    Inherits Nuvolar.Module.MySchedule_VC

    Public Sub New()
        MyBase.New()
        InitializeComponent()
        RegisterActions(components)

    End Sub

    Protected Overrides Sub OnViewControlsCreated()
        MyBase.OnViewControlsCreated()
        If View.Id = "MySchedule_ListView" Or View.Id = "Contacts_CRM_Leads_Activity_ListView" Then
            Dim currentView As ListView = CType(View, ListView)
            Dim listEditor As ASPxSchedulerListEditor = CType(currentView.Editor, ASPxSchedulerListEditor)
            Dim scheduler As ASPxScheduler = listEditor.SchedulerControl

            If Not scheduler Is Nothing Then
                scheduler.Views.DayView.VisibleTime = New TimeOfDayInterval(New TimeSpan(7, 0, 0), New TimeSpan(19, 0, 0))
                scheduler.Views.WorkWeekView.VisibleTime = New TimeOfDayInterval(New TimeSpan(7, 0, 0), New TimeSpan(19, 0, 0))
            End If
        End If
    End Sub
End Class
