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.SystemModule
Imports DevExpress.ExpressApp.Editors
Imports DevExpress.ExpressApp.Win.Editors
Imports DevExpress.ExpressApp.Model
Imports DevExpress.XtraLayout

Public Class Customization
    Inherits DevExpress.ExpressApp.WindowController
    Private controller As WindowTemplateController
    Public Sub New()
        TargetWindowType = WindowType.Main
        AddHandler Activated, AddressOf CustomizeWindowController_Activated
    End Sub
    Private Sub CustomizeWindowController_Activated(ByVal sender As Object, ByVal e As EventArgs)
        controller = Frame.GetController(Of WindowTemplateController)()
        AddHandler controller.CustomizeWindowCaption, AddressOf controller_CustomizeWindowCaption
        AddHandler controller.CustomizeWindowStatusMessages, AddressOf controller_CustomizeWindowStatusMessages

    End Sub
    Private Sub controller_CustomizeWindowCaption(ByVal sender As Object, _
    ByVal e As CustomizeWindowCaptionEventArgs)
        e.WindowCaption.SecondPart = GLOBAL_WINFormCaption
    End Sub
    Private Sub controller_CustomizeWindowStatusMessages(ByVal sender As Object, _
        ByVal e As CustomizeWindowStatusMessagesEventArgs)
        e.StatusMessages.Add(GLOBAL_WINFormCaption)
    End Sub
End Class
Public Class CustomDateTimeEditor
    Inherits DatePropertyEditor
    Public Sub New(ByVal objectType As Type, ByVal info As IModelMemberViewItem)
        MyBase.New(objectType, info)
    End Sub
    Protected Overrides Sub SetupRepositoryItem(ByVal item As DevExpress.XtraEditors.Repository.RepositoryItem)
        'MyBase.SetupRepositoryItem(item)
        'CType(item, RepositoryItemDateTimeEdit).VistaDisplayMode = _
        'DevExpress.Utils.DefaultBoolean.True
        'CType(item, RepositoryItemDateTimeEdit).VistaEditTime = _
        'DevExpress.Utils.DefaultBoolean.True
        'CType(item, RepositoryItemDateTimeEdit).Mask.EditMask = "MM.dd.yyyy hh:mm:ss"
        'CType(item, RepositoryItemDateTimeEdit).Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTimeAdvancingCaret
        'CType(item, RepositoryItemDateTimeEdit).AllowNullInput = True
    End Sub
    
End Class