Imports System
Imports System.ComponentModel

Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering

Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
Imports DevExpress.ExpressApp.ConditionalAppearance

<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
<NonPersistent()> _
<Appearance("Hide CurrencyRate2 when IsHUF=True", AppearanceItemType:="ViewItem", TargetItems:="CurrencyRate2;IsHUF", _
             Criteria:="IsHUF=True", Visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide CurrencyRate when IsHUF=False", AppearanceItemType:="ViewItem", TargetItems:="CurrencyRate;IsHUF", _
             Criteria:="IsHUF=False", Visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)> _
Public Class RateDiffCurrencyPopUp
    Inherits BaseObject
    Private _CurrencyRate As Double
    Private _CurrencyRate2 As Double
    Private _IsHUF As Boolean = False
    Public Sub New(ByVal session As Session)
        MyBase.New(session)
        ' This constructor is used when an object is loaded from a persistent storage.
        ' Do not place any code here or place it only when the IsLoading property is false:
        ' if (!IsLoading){
        '   It is now OK to place your initialization code here.
        ' }
        ' or as an alternative, move your initialization code into the AfterConstruction method.
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
        ' Place here your initialization code.
    End Sub
    Property CurrencyRate As Double
        Get
            Return _CurrencyRate
        End Get
        Set(value As Double)
            SetPropertyValue("CurrencyRate", _CurrencyRate, value)
        End Set
    End Property
    Property CurrencyRate2 As Double
        Get
            Return _CurrencyRate2
        End Get
        Set(value As Double)
            SetPropertyValue("CurrencyRate2", _CurrencyRate2, value)
        End Set
    End Property
    Property IsHUF As Boolean
        Get
            Return _IsHUF
        End Get
        Set(value As Boolean)
            SetPropertyValue("IsHUF", _IsHUF, value)
        End Set
    End Property
End Class
