
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 tsInputBox
    Private Sub dxwAgregar_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
    End Sub
    Public Property Valor As String

    Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
        Me.DialogResult = True
        Valor = Me.teValor.EditValue        
    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 String, Optional LongitudMaxima As Integer = 0)

        ' Llamada necesaria para el diseñador.
        InitializeComponent()
        Me.liRotulo.Label = Rotulo
        Me.teValor.EditValue = ValorDefecto
        If LongitudMaxima > 0 Then Me.teValor.MaxLength = LongitudMaxima

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

    End Sub
End Class
