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.Win.Editors

Public Class LiquidAssetsReturnVC
    Inherits SISBusiness.Module.LiquidAssetsReturnVC
    Dim _WaitFormClass As New WaitFormClass
    Private _GridListEditor As GridListEditor
    Public Sub New()
        MyBase.New()

        InitializeComponent()
        RegisterActions(components)

    End Sub
    Protected Overrides Sub OnActivated()
        MyBase.OnActivated()

        AddHandler DoWork, AddressOf _WaitFormClass.DoWork
        AddHandler InitWork, AddressOf _WaitFormClass.Initwork
        AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
    End Sub
    Protected Overrides Sub OnDeactivated()
        MyBase.OnDeactivated()

        RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
        RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork
        RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork
    End Sub

    Protected Overrides Sub OnViewControlsCreated()
        MyBase.OnViewControlsCreated()
        'If View.Id = "LiquidAssetsReturnHeader_LiquidAssetsReturnDenomination_ListView" Then
        '    Dim _ListView As ListView = CType(View, ListView)
        '    Dim _PropertyCollectionSource As PropertyCollectionSource = CType(_ListView.CollectionSource, PropertyCollectionSource)

        '        _GridListEditor = TryCast(_ListView.Editor, GridListEditor)
        '        If _GridListEditor IsNot Nothing Then
        '            _GridListEditor.AllowEdit = True
        '            For i As Integer = 0 To _GridListEditor.Columns.Count - 1
        '                If _GridListEditor.GridView.Columns(i).FieldName <> "DenominationValue" Then
        '                    _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
        '                    _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
        '                    _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
        '                End If
        '            Next i
        '        End If
        '    End If

    End Sub
End Class
