
Imports System.Data.Entity
Imports DevExpress.Xpf.Core.ServerMode
Imports DevExpress.Mvvm
Imports DevExpress.Xpf.Grid
Imports tsWPF
Imports tsl5.Extensiones
Imports DevExpress.Xpf.Core
Imports DevExpress.XtraReports.UI
Imports System.IO
Imports DevExpress.Xpf.Printing
Imports Microsoft.Win32
Imports System.Data.Objects
Imports System.Data.Objects.DataClasses
Public Class tsInputBoxImporte
    Private Sub dxwAgregar_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
    End Sub
    Public Property Valor As Double
    Public Property _ValorMinimo As Double?

    Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
        Valor = Me.teValor.EditValue
        If _ValorMinimo.HasValue AndAlso Valor < _ValorMinimo Then
            DXMessageBox.Show("El valor mínimo es " & _ValorMinimo.ToString("c2"))
        Else
            Me.DialogResult = True
        End If
    End Sub

    Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs)
        Me.DialogResult = False
        Me.Close()
    End Sub

    Public Sub New(Rotulo As String, ValorDefecto As Double, Optional ValorMinimo As Double? = Nothing)

        ' Llamada necesaria para el diseñador.
        InitializeComponent()
        Me.liRotulo.Label = Rotulo
        Me.teValor.EditValue = ValorDefecto
        _ValorMinimo = ValorMinimo


        ' Agregue cualquier inicialización después de la llamada a InitializeComponent().

    End Sub
End Class
