Agregar archivos de proyecto.
This commit is contained in:
706
InicioServicioYClientes/Rutinas.vb
Normal file
706
InicioServicioYClientes/Rutinas.vb
Normal file
@@ -0,0 +1,706 @@
|
||||
Imports System.Runtime.Remoting
|
||||
Imports System.IO
|
||||
Imports System.Xml
|
||||
Imports System.Xml.Serialization
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Drawing
|
||||
Imports tsl5.Enumeraciones
|
||||
Imports tsl5.tsl5Model
|
||||
|
||||
|
||||
Public Class Rutinas
|
||||
Shared Sub IniciaServicioNR(Puerto As Integer, Nombre As String, tipo As Type)
|
||||
Dim ht As New Hashtable
|
||||
ht("port") = Puerto
|
||||
ht("name") = Nombre
|
||||
Dim serverProvTcp As New System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider
|
||||
serverProvTcp.TypeFilterLevel = Runtime.Serialization.Formatters.TypeFilterLevel.Full
|
||||
Dim clientProvTcp As New System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider
|
||||
Dim tc As System.Runtime.Remoting.Channels.Tcp.TcpChannel = New System.Runtime.Remoting.Channels.Tcp.TcpChannel(ht, clientProvTcp, serverProvTcp)
|
||||
System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownServiceType(tipo, Nombre & ".soap", WellKnownObjectMode.Singleton)
|
||||
End Sub
|
||||
Shared Function ObtieneObjetoServicioNR(Servidor As String, Puerto As Integer, Nombre As String) As tsl5.Interfaces.IServicioNR
|
||||
Dim sr As tsl5.Interfaces.IServicioNR
|
||||
Dim sPuertoNR As String = Puerto
|
||||
sr = System.Activator.GetObject(GetType(tsl5.Interfaces.IServicioNR), "tcp://" & Servidor & ":" & sPuertoNR & "/" & Nombre & ".soap")
|
||||
Return sr
|
||||
|
||||
End Function
|
||||
'Shared Function ObtieneActualizaciones(VersionServidor As Datos.Actualizacion, ByRef VersionAComparar As Datos.Actualizacion) As tsl5.Enumeraciones.tipoActualizacionEnum
|
||||
' Dim TipoActualizacion As tsl5.Enumeraciones.tipoActualizacionEnum = Enumeraciones.tipoActualizacionEnum.No_Actualizar
|
||||
' Dim NuevosElementos As New List(Of Datos.ElementoActualizable)
|
||||
' For Each fichero In VersionServidor.Elementos 'VersionAComparar.Elementos
|
||||
' Dim sNombreFichero As String = fichero.NombreFichero
|
||||
' Dim sRutaFichero As String = fichero.RutaFichero
|
||||
' Dim TipoFichero As TipoFicheroActualizableEnum = fichero.tipoFichero
|
||||
' Dim fs = From f In VersionAComparar.Elementos Where f.NombreFichero = sNombreFichero And f.tipoFichero = TipoFichero And f.RutaFichero = sRutaFichero Select f
|
||||
' If fs.Count = 0 Then
|
||||
' Dim NuevoFich As New Datos.ElementoActualizable
|
||||
' NuevoFich = fichero
|
||||
' NuevoFich.Comparacion = Enumeraciones.ComparacionEnum.Nuevo
|
||||
' NuevosElementos.Add(NuevoFich)
|
||||
' If NuevoFich.tipoFichero = Enumeraciones.tipoFicheroActualizableEnum.Datos Then
|
||||
' If TipoActualizacion = Enumeraciones.tipoActualizacionEnum.No_Actualizar Then
|
||||
' TipoActualizacion = Enumeraciones.tipoActualizacionEnum.Actualizacion_Sin_Reinicio
|
||||
' ElseIf TipoActualizacion = TipoActualizacionEnum.Actualizacion_Con_Reinicio Then
|
||||
' TipoActualizacion = Enumeraciones.tipoActualizacionEnum.Actualizacion_Mixta
|
||||
' End If
|
||||
' Else
|
||||
' If TipoActualizacion = Enumeraciones.tipoActualizacionEnum.No_Actualizar Then
|
||||
' TipoActualizacion = Enumeraciones.tipoActualizacionEnum.Actualizacion_Con_Reinicio
|
||||
' Else
|
||||
' If TipoActualizacion = TipoActualizacionEnum.Actualizacion_Sin_Reinicio Then TipoActualizacion = Enumeraciones.tipoActualizacionEnum.Actualizacion_Mixta
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' If fs(0).FechaModificacion <> fichero.FechaModificacion Then
|
||||
' If fichero.tipoFichero = Enumeraciones.tipoFicheroActualizableEnum.Datos Then
|
||||
' If TipoActualizacion = Enumeraciones.tipoActualizacionEnum.No_Actualizar Then
|
||||
' TipoActualizacion = Enumeraciones.tipoActualizacionEnum.Actualizacion_Sin_Reinicio
|
||||
' ElseIf TipoActualizacion = TipoActualizacionEnum.Actualizacion_Con_Reinicio Then
|
||||
' TipoActualizacion = Enumeraciones.tipoActualizacionEnum.Actualizacion_Mixta
|
||||
' End If
|
||||
' Else
|
||||
' If TipoActualizacion = Enumeraciones.tipoActualizacionEnum.No_Actualizar Then
|
||||
' TipoActualizacion = Enumeraciones.tipoActualizacionEnum.Actualizacion_Con_Reinicio
|
||||
' Else
|
||||
' If TipoActualizacion = TipoActualizacionEnum.Actualizacion_Sin_Reinicio Then TipoActualizacion = Enumeraciones.tipoActualizacionEnum.Actualizacion_Mixta
|
||||
' End If
|
||||
' End If
|
||||
' fs(0).Comparacion = Enumeraciones.ComparacionEnum.Diferente
|
||||
' fs(0).FechaModificacion = fichero.FechaModificacion
|
||||
' Else
|
||||
' fs(0).Comparacion = Enumeraciones.ComparacionEnum.Sin_Cambios
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
' For Each fichero In VersionAComparar.Elementos
|
||||
' Dim sNombreFichero As String = fichero.NombreFichero
|
||||
' Dim sRutaFichero As String = fichero.RutaFichero
|
||||
' Dim TipoFichero As TipoFicheroActualizableEnum = fichero.tipoFichero
|
||||
' Dim fs = From f In VersionServidor.Elementos Where f.NombreFichero = sNombreFichero And f.tipoFichero = TipoFichero And f.RutaFichero = sRutaFichero Select f
|
||||
' 'Dim fs = From f In VersionServidor.Elementos Where f.NombreFichero = sNombreFichero Select f
|
||||
' If fs.Count = 0 Then
|
||||
' fichero.Comparacion = Enumeraciones.ComparacionEnum.Inexistente
|
||||
' End If
|
||||
' Next
|
||||
' For Each fichero In NuevosElementos
|
||||
' VersionAComparar.Elementos.Add(fichero)
|
||||
' Next
|
||||
' Return TipoActualizacion
|
||||
'End Function
|
||||
|
||||
'Public Shared Function ObtieneVersionFicherosRecursivo(NombreActualizacion As String, RutaDatos As String) As Datos.Actualizacion
|
||||
' Dim Actualizacion As New Datos.Actualizacion
|
||||
' ObtieneVersion(Actualizacion, RutaDatos, RutaDatos, Enumeraciones.TipoFicheroActualizableEnum.Datos)
|
||||
' Actualizacion.Nombre = NombreActualizacion
|
||||
' Return Actualizacion
|
||||
'End Function
|
||||
|
||||
'Public Shared Sub ObtieneVersion(ByRef Version As Datos.Actualizacion, Ruta As String, RutaInicial As String, TipoFichero As Enumeraciones.tipoFicheroActualizableEnum)
|
||||
' Dim iBarra As Integer = 1
|
||||
' If Ruta.EndsWith("\") Then iBarra = 0
|
||||
' Dim sDirectorios() As String = IO.Directory.GetDirectories(Ruta)
|
||||
' For Each sdirectorio In sDirectorios
|
||||
' ObtieneVersion(Version, sdirectorio, RutaInicial, TipoFichero)
|
||||
' Next
|
||||
' Dim sFicheros() As String = IO.Directory.GetFiles(Ruta)
|
||||
' Dim sfichero As String
|
||||
' Dim ea As Datos.ElementoActualizable
|
||||
' Dim fi As FileInfo
|
||||
' For Each sfichero In sFicheros
|
||||
' ea = New Datos.ElementoActualizable
|
||||
' ea.NombreFichero = sfichero.Substring(Ruta.Length + iBarra)
|
||||
' fi = New FileInfo(sfichero)
|
||||
' ea.FechaModificacion = fi.LastWriteTimeUtc
|
||||
' ea.tipoFichero = TipoFichero
|
||||
' ea.RutaFichero = ""
|
||||
' If Ruta <> RutaInicial Then ea.RutaFichero = Ruta.Substring(RutaInicial.Length).trimStart("\") & "\"
|
||||
' Version.Elementos.Add(ea)
|
||||
' Next
|
||||
'End Sub
|
||||
|
||||
' Shared Function GeneraDatosActualizacion(NombreActualizacion As String, RutaDatos As String) As Datos.Actualizacion
|
||||
' Dim act As New Datos.Actualizacion
|
||||
' act = ObtieneVersionFicherosRecursivo(NombreActualizacion, RutaDatos)
|
||||
' Return act
|
||||
'End Function
|
||||
|
||||
'Shared Sub InicioServicios(ByRef Configuracion As Datos.DatosConfiguracionServicio, ByRef VersionesFicherosCliente() As Datos.Actualizacion, ServicioNetRemoting As Type)
|
||||
' 'ReDim VersionesFicherosCliente(Configuracion.OtrosActualizadores.Count - 1)
|
||||
' 'Dim da As New Datos.Actualizacion
|
||||
' 'For i = 0 To Configuracion.OtrosActualizadores.Count - 1
|
||||
' ' da = ObtieneVersionFicherosRecursivo(Configuracion.OtrosActualizadores(i).Nombre, Configuracion.OtrosActualizadores(i).RutaDatos)
|
||||
' ' VersionesFicherosCliente(i) = da
|
||||
' 'Next
|
||||
' Call tsl5.Rutinas.IniciaServicioNR(Configuracion.PuertoNR, Configuracion.NombreServicio, ServicioNetRemoting)
|
||||
'End Sub
|
||||
|
||||
Shared Function IniciarSesion(FicheroConfiguracion As String, Usuario As String, SHA1passwd As String, ByRef idGrupoBD As Integer, dllProcesos As String) As tsl5.Datos.DatosSesionCliente
|
||||
Try
|
||||
Dim configuracionservidor As New tsl5.Datos.DatosConfiguracionServicio
|
||||
configuracionservidor = Datos.DatosConfiguracionServicio.CargaConfiguracion(FicheroConfiguracion, dllProcesos)
|
||||
Dim bd As New MySql.Data.MySqlClient.MySqlConnection(bbdd.GeneraConnectionStringMySQL(configuracionservidor.BasesDatos(0).Servidor, configuracionservidor.BasesDatos(0).DataBase, configuracionservidor.BasesDatos(0).Usuario, configuracionservidor.BasesDatos(0).Password, configuracionservidor.BasesDatos(0).Puerto))
|
||||
Dim drUsuario As DataRow = bbdd.ObtienePrimeraFilaMysql(bd, "Select * From Usuarios where Usuario=? and SHA1passwd=?", {Usuario, SHA1passwd})
|
||||
If drUsuario Is Nothing Then Throw New Exception("Usuario no válido")
|
||||
Dim drGrupo As DataRow = bbdd.ObtienePrimeraFilaMysql(bd, "Select * From GruposUsuarios where idGrupo=?", {drUsuario("idGrupo")})
|
||||
Dim ds As New tsl5.Datos.DatosSesionCliente
|
||||
ds.IdSesion = 1 'TODO: leer de constante
|
||||
ds.idUsuario = drUsuario("idUsuarios")
|
||||
ds.idGrupoMenu = drGrupo("idGrupoMenu")
|
||||
idGrupoBD = drUsuario("idGrupobd")
|
||||
Return ds
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function ObtieneDatConexClienteSinServicio(FicheroConf As String, Peticion As tsl5.Datos.DatosConfiguracionCliente, idGrupoBD As Integer) As tsl5.Datos.DatosConexionCliente
|
||||
Try
|
||||
|
||||
Return tsl5.Rutinas.ObtieneDatosConexionCliente(FicheroConf, Peticion.ConstantesCliente.NombreServicio, Peticion.ServidorActivo.Localizacion, idGrupoBD, "")
|
||||
Catch exc As Exception
|
||||
Throw New Exception(exc.Message, exc)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Shared Function ObtieneDatosConexionClienteSinServicio(FicheroConfiguracion As String, NombreServicio As String, Localizacion As Enumeraciones.LocalizacionesEnum, idGrupoBD As Integer, dllProcesos As String) As tsl5.Datos.DatosConexionCliente
|
||||
Try
|
||||
Dim configuracionservidor As New tsl5.Datos.DatosConfiguracionServicio
|
||||
configuracionservidor = Datos.DatosConfiguracionServicio.CargaConfiguracion(FicheroConfiguracion, dllProcesos)
|
||||
Dim bd As New MySql.Data.MySqlClient.MySqlConnection(bbdd.GeneraConnectionStringMySQL(configuracionservidor.BasesDatos(0).Servidor, configuracionservidor.BasesDatos(0).DataBase, configuracionservidor.BasesDatos(0).Usuario, configuracionservidor.BasesDatos(0).Password, configuracionservidor.BasesDatos(0).Puerto))
|
||||
' ''Dim drUsuario As DataRow = bbdd.ObtienePrimeraFilaMysql(bd, "Select * From Usuarios where Usuario=? and SHA1passwd=?", {Peticion.Usuario, Peticion.Password})
|
||||
' ''If drUsuario Is Nothing Then Throw New Exception("Usuario no válido")
|
||||
Dim dtBBDD As DataTable = bbdd.ObtieneTablaMysql(bd, "SELECT * FROM conexionesbd inner join grupobd on grupobd.idgrupobd=conexionesbd.idgrupobd where grupobd.idgrupobd=?", {idGrupoBD})
|
||||
Dim dcc As New tsl5.Datos.DatosConexionCliente
|
||||
For Each dr In dtBBDD.Rows
|
||||
Dim bbdd As New tsl5.Datos.BBDD
|
||||
bbdd.Usuario = dr("Usuario")
|
||||
bbdd.Password = dr("Password")
|
||||
bbdd.DataBase = dr("Esquema")
|
||||
If Localizacion = Enumeraciones.LocalizacionesEnum.Local Then
|
||||
bbdd.Servidor = dr("ServidorLocal")
|
||||
bbdd.Puerto = dr("PuertoLocal")
|
||||
Else
|
||||
bbdd.Servidor = dr("ServidorRemoto")
|
||||
bbdd.Puerto = dr("PuertoRemoto")
|
||||
End If
|
||||
dcc.BasesDatos.Add(bbdd)
|
||||
Next
|
||||
|
||||
'Dim act = From a In configuracionservidor.OtrosActualizadores Where a.Nombre = NombreServicio Select a
|
||||
'If Localizacion = Enumeraciones.LocalizacionesEnum.Local Then
|
||||
' dcc.ServidorActualizador = act(0).ServidorLocal
|
||||
'Else
|
||||
' dcc.ServidorActualizador = act(0).ServidorRemoto
|
||||
'End If
|
||||
Return dcc
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Shared Function ObtieneDatosConexionCliente(FicheroConfiguracion As String, NombreServicio As String, Localizacion As Enumeraciones.LocalizacionesEnum, idGrupoBD As Integer, dllProcesos As String) As tsl5.Datos.DatosConexionCliente
|
||||
Try
|
||||
Dim configuracionservidor As New tsl5.Datos.DatosConfiguracionServicio
|
||||
configuracionservidor = Datos.DatosConfiguracionServicio.CargaConfiguracion(FicheroConfiguracion, dllProcesos)
|
||||
Dim bd As New MySql.Data.MySqlClient.MySqlConnection(bbdd.GeneraConnectionStringMySQL(configuracionservidor.BasesDatos(0).Servidor, configuracionservidor.BasesDatos(0).DataBase, configuracionservidor.BasesDatos(0).Usuario, configuracionservidor.BasesDatos(0).Password, configuracionservidor.BasesDatos(0).Puerto))
|
||||
' ''Dim drUsuario As DataRow = bbdd.ObtienePrimeraFilaMysql(bd, "Select * From Usuarios where Usuario=? and SHA1passwd=?", {Peticion.Usuario, Peticion.Password})
|
||||
' ''If drUsuario Is Nothing Then Throw New Exception("Usuario no válido")
|
||||
Dim dtBBDD As DataTable = bbdd.ObtieneTablaMysql(bd, "SELECT * FROM conexionesbd inner join grupobd on grupobd.idgrupobd=conexionesbd.idgrupobd where grupobd.idgrupobd=?", {idGrupoBD})
|
||||
Dim dcc As New tsl5.Datos.DatosConexionCliente
|
||||
For Each dr In dtBBDD.Rows
|
||||
Dim bbdd As New tsl5.Datos.BBDD
|
||||
bbdd.Usuario = dr("Usuario")
|
||||
bbdd.Password = dr("Password")
|
||||
bbdd.DataBase = dr("Esquema")
|
||||
If Localizacion = Enumeraciones.LocalizacionesEnum.Local Then
|
||||
bbdd.Servidor = dr("ServidorLocal")
|
||||
bbdd.Puerto = dr("PuertoLocal")
|
||||
Else
|
||||
bbdd.Servidor = dr("ServidorRemoto")
|
||||
bbdd.Puerto = dr("PuertoRemoto")
|
||||
End If
|
||||
dcc.BasesDatos.Add(bbdd)
|
||||
Next
|
||||
|
||||
'Dim act = From a In configuracionservidor.OtrosActualizadores Where a.Nombre = NombreServicio Select a
|
||||
'If Localizacion = Enumeraciones.LocalizacionesEnum.Local Then
|
||||
' dcc.ServidorActualizador = act(0).ServidorLocal
|
||||
'Else
|
||||
' dcc.ServidorActualizador = act(0).ServidorRemoto
|
||||
'End If
|
||||
Return dcc
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
Shared Function IniciaSesion(sr As tsl5.Interfaces.IServicioNR, Usuario As String, Contraseña As String, idGrupoBD As Integer) As Datos.DatosSesionCliente
|
||||
Dim e As Exception = Nothing
|
||||
Dim dsc As Datos.DatosSesionCliente
|
||||
dsc = sr.IniciaSesion(Usuario, Contraseña, idGrupoBD, e)
|
||||
If Not e Is Nothing Then Throw e
|
||||
Return dsc
|
||||
End Function
|
||||
|
||||
Public Shared Function IniciaSesionSinServicio(Usuario As String, Contraseña As String, ByRef idGrupoBD As Integer, Aplicacion As String, ByRef ex As System.Exception) As tsl5.Datos.DatosSesionCliente
|
||||
Try
|
||||
ex = Nothing
|
||||
Dim sSHA1passwd As String = crypt.SHA1("M3Soft." & Contraseña)
|
||||
Dim sFicheroConf As String = ObtieneFicheroConfiguracionGenerico(Aplicacion)
|
||||
Return tsl5.Rutinas.IniciarSesion(sFicheroConf, Usuario, sSHA1passwd, idGrupoBD, "")
|
||||
Catch exc As Exception
|
||||
ex = exc
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Shared Function ObtieneFicheroConfiguracionGenerico(Aplicacion) As String
|
||||
Dim sRutaConfiguraciones As String
|
||||
sRutaConfiguraciones = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) & "\Depuracion\" & Aplicacion & "\Servidor\ServidorConfig.xml"
|
||||
If Not IO.File.Exists(sRutaConfiguraciones) Then
|
||||
sRutaConfiguraciones = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) & "\" & Aplicacion & "\Servidor\ServidorConfig.xml"
|
||||
End If
|
||||
Return sRutaConfiguraciones
|
||||
End Function
|
||||
|
||||
|
||||
Shared Function ObtieneDatConexCliente(Dcc As Datos.DatosConfiguracionCliente, ByRef sr As tsl5.Interfaces.IServicioNR, idGrupoBD As Integer) As Datos.DatosConexionCliente
|
||||
Dim e As Exception = Nothing
|
||||
Dim dc As Datos.DatosConexionCliente
|
||||
sr = tsl5.Rutinas.ObtieneObjetoServicioNR(Dcc.ServidorActivo.Servidor, Dcc.ServidorActivo.Puerto, Dcc.ConstantesCliente.NombreServicio)
|
||||
'dc = sr.IniciaSesion(Dcc, e)
|
||||
dc = sr.ObtieneDatosConexionCliente(Dcc, idGrupoBD, e)
|
||||
If Not e Is Nothing Then Throw e
|
||||
Return dc
|
||||
End Function
|
||||
|
||||
'Shared Sub ActualizaCliente(DatConfCli As Datos.DatosConfiguracionCliente, ByRef DatConexCli As Datos.DatosConexionCliente, sr As tsl5.Interfaces.IServicioNR)
|
||||
' Try
|
||||
' If Not Windows.Forms.Application.StartupPath.ToLower.StartsWith("c:\tecnosis.tfs\") Then
|
||||
' Dim da As New Datos.Actualizacion
|
||||
' Dim e As Exception = Nothing
|
||||
' da = tsl5.Rutinas.GeneraDatosActualizacion(DatConfCli.ConstantesCliente.NombreServicio, DatConfCli.ConstantesCliente.RutaDatos)
|
||||
' Dim ap As Enumeraciones.tipoActualizacionEnum = sr.CompruebaActualizacionesCliente(DatConfCli.ConstantesCliente.NombreServicio, da, e)
|
||||
' If Not e Is Nothing Then Throw e
|
||||
' Select Case ap
|
||||
' Case Enumeraciones.tipoActualizacionEnum.Actualizacion_Mixta
|
||||
' Actualiza(da, DatConfCli, DatConexCli, TipoFicheroActualizableEnum.Datos)
|
||||
' LlamaActualizadorAuxiliar(da, DatConfCli, DatConexCli)
|
||||
' Case Enumeraciones.tipoActualizacionEnum.Actualizacion_Sin_Reinicio
|
||||
' Actualiza(da, DatConfCli, DatConexCli, TipoFicheroActualizableEnum.Datos)
|
||||
' Case TipoActualizacionEnum.Actualizacion_Con_Reinicio
|
||||
' LlamaActualizadorAuxiliar(da, DatConfCli, DatConexCli)
|
||||
' End Select
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' Throw ex
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
'Public Shared Sub Actualiza(DatosActualizacion As Datos.Actualizacion, DatConfCli As Datos.DatosConfiguracionCliente, DatConexCli As Datos.DatosConexionCliente, FicherosAActualizar As TipoFicheroActualizableEnum)
|
||||
' Try
|
||||
' If IO.Directory.Exists(DatConfCli.ConstantesCliente.RutaTmp) Then IO.Directory.Delete(DatConfCli.ConstantesCliente.RutaTmp, True)
|
||||
' IO.Directory.CreateDirectory(DatConfCli.ConstantesCliente.RutaTmp)
|
||||
' Dim fActualizador As New frmActualizador
|
||||
' fActualizador.tipoActualizacion = FicherosAActualizar
|
||||
' fActualizador.DatosActualizacion = DatosActualizacion
|
||||
' fActualizador.DatConfCli = DatConfCli
|
||||
' fActualizador.DatConexCli = DatConexCli
|
||||
' fActualizador.ShowDialog()
|
||||
' Catch ex As Exception
|
||||
' Throw ex
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
'Private Shared Sub DescargaElementoFTP(servidorActualizacion As Datos.ServidorActualizacion, NombreFichero As String, RutaDescarga As String)
|
||||
' Dim ftp As New Dart.PowerTCP.SecureFtp.Ftp
|
||||
' ftp.Server = servidorActualizacion.Servidor
|
||||
' ftp.Username = servidorActualizacion.Usuario
|
||||
' ftp.Password = servidorActualizacion.Contraseña
|
||||
' ftp.Passive = servidorActualizacion.Pasivo
|
||||
' ftp.ServerPort = servidorActualizacion.Puerto
|
||||
' If servidorActualizacion.SSL Then
|
||||
' ftp.Security = Dart.PowerTCP.SecureFtp.Security.Implicit
|
||||
' Else
|
||||
' ftp.Security = Dart.PowerTCP.SecureFtp.Security.None
|
||||
' End If
|
||||
' ftp.Get(servidorActualizacion.Directorio & NombreFichero, RutaDescarga & NombreFichero)
|
||||
'End Sub
|
||||
|
||||
'Private Shared Sub DescargaElementoSamba(servidorActualizacion As Datos.ServidorActualizacion, NombreFichero As String, RutaDescarga As String)
|
||||
' IO.File.Copy(servidorActualizacion.Directorio & "\" & NombreFichero, RutaDescarga & NombreFichero, True)
|
||||
'End Sub
|
||||
|
||||
'Private Shared Sub LlamaActualizadorAuxiliar(da As Datos.Actualizacion, DatConfCli As Datos.DatosConfiguracionCliente, DatConexCli As Datos.DatosConexionCliente)
|
||||
' Dim DatosActAux As New Datos.DatosActualizadorAuxiliar
|
||||
' DatosActAux.Actualizacion = da
|
||||
' DatosActAux.ConfiguracionCliente = DatConfCli
|
||||
' DatosActAux.ConexionCliente = DatConexCli
|
||||
' DatosActAux.RutaEjecutable = Windows.Forms.Application.StartupPath & "\" & Process.GetCurrentProcess.ProcessName & ".exe"
|
||||
' Dim sFicDatosAct As String
|
||||
' sFicDatosAct = DatConfCli.ConstantesCliente.RutaDatos & "\ActualizadorAuxiliar\DatosActAux.xml"
|
||||
' Utilidades.serializar(DatosActAux, sFicDatosAct)
|
||||
' If Not IO.File.Exists(DatConfCli.ConstantesCliente.RutaDatos & "\ActualizadorAuxiliar\ActualizadorAuxiliar.exe") Then
|
||||
' MsgBox("No existe el programa actualizador", MsgBoxStyle.Critical, "Error")
|
||||
' Else
|
||||
' Process.Start(DatConfCli.ConstantesCliente.RutaDatos & "\ActualizadorAuxiliar\ActualizadorAuxiliar.exe", sFicDatosAct)
|
||||
' 'MsgBox("El programa se tiene que actualizar.")
|
||||
' 'Windows.Forms.Application.Exit()
|
||||
' Environment.Exit(0)
|
||||
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Shared Sub GeneraMenus(Formulario As Form, datconexcli As Datos.DatosConexionCliente, datsesioncli As Datos.DatosSesionCliente, Evento As EventHandler)
|
||||
Dim menuprincipal As New MenuStrip
|
||||
Dim bd As tsl5Entities
|
||||
menuprincipal.Location = New Point(0.0)
|
||||
Dim tsmi As ToolStripMenuItem
|
||||
Select Case datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).Tipo
|
||||
Case TipoBD.MYSQL
|
||||
bd = bbdd.ConectarTsl5EntityMySQL(datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).Servidor, datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).DataBase, datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).Puerto, datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).Usuario, datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).Password, "tsl5Model")
|
||||
Case TipoBD.SQLSERVER
|
||||
bd = bbdd.ConectarTsl5EntitySQLServer(datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).Servidor, datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).DataBase, datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).Usuario, datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).Password, "tsl5Model")
|
||||
Case TipoBD.LOCALDB
|
||||
bd = bbdd.ConectarTsl5EntityLocalDB(datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).Servidor, datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).Fichero, datconexcli.BasesDatos(datconexcli.NumeroBDConfiguracion).DataBase, "tsl5Model")
|
||||
Case Else
|
||||
Throw New Exception("Tipo de bd no soportado")
|
||||
End Select
|
||||
|
||||
|
||||
Dim menuiniciales = (From m In bd.menus Where m.idGrupoMenu = datsesioncli.idGrupoMenu Order By m.Orden Select m).ToList
|
||||
|
||||
For Each mi In menuiniciales
|
||||
tsmi = New ToolStripMenuItem(mi.Texto, Nothing, Evento)
|
||||
Call generamenurecursivo(bd, tsmi, mi, Evento)
|
||||
menuprincipal.Items.Add(tsmi)
|
||||
Next
|
||||
|
||||
Formulario.Controls.Add(menuprincipal)
|
||||
Formulario.MainMenuStrip = menuprincipal
|
||||
End Sub
|
||||
|
||||
Private Shared Sub generamenurecursivo(bd As tsl5Entities, ByRef tsmi As ToolStripMenuItem, mi As menus, Evento As EventHandler)
|
||||
Dim tssmi As ToolStripMenuItem
|
||||
Dim submenus = (From m In bd.menus Where m.idMenuPadre = mi.idMenus Order By m.Orden Select m).ToList
|
||||
For Each sm In submenus
|
||||
tssmi = New ToolStripMenuItem(sm.Texto, Nothing, Evento)
|
||||
tssmi.Tag = sm.Accion
|
||||
tssmi.ToolTipText = sm.Ayuda
|
||||
Call generamenurecursivo(bd, tssmi, sm, Evento)
|
||||
tsmi.DropDownItems.Add(tssmi)
|
||||
Next
|
||||
End Sub
|
||||
<System.Diagnostics.DebuggerStepThrough()> Public Shared Function Ttagi(ByVal sValortag As String, ByVal sToken As String) As String
|
||||
Ttagi = ""
|
||||
Try
|
||||
sValortag = "|" & sValortag & "|"
|
||||
If InStr(1, "|" & sValortag & "|", "|" & sToken & "=", vbTextCompare) > 0 Then
|
||||
Ttagi = Mid(sValortag, (InStr(1, sValortag, "|" & sToken & "=") + Len(sToken) + 2), InStr(1, Mid(sValortag, InStr(1, sValortag, "|" & sToken & "=") + Len(sToken) + 2), "|") - 1)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function FindType(ByVal name As String) As Type
|
||||
Dim base As Type
|
||||
|
||||
base = Reflection.Assembly.GetEntryAssembly.GetType(name, False, True)
|
||||
If base IsNot Nothing Then Return base
|
||||
|
||||
base = Reflection.Assembly.GetExecutingAssembly.GetType(name, False, True)
|
||||
If base IsNot Nothing Then Return base
|
||||
|
||||
For Each assembly As Reflection.Assembly In _
|
||||
AppDomain.CurrentDomain.GetAssemblies
|
||||
base = assembly.GetType(name, False, True)
|
||||
If base IsNot Nothing Then Return base
|
||||
Next
|
||||
Throw New Exception("Clase no encontrada")
|
||||
End Function
|
||||
Public Shared Sub InicioCliente(NombreServicio As String, Formulario As Form, tcFormularios As System.Windows.Forms.TabControl, FichConfProduccion As String, FichConfDesarrollo As String, Evento As EventHandler, ByRef datconfcli As Datos.DatosConfiguracionCliente, ByRef datconexcli As Datos.DatosConexionCliente, ByRef datsesioncli As Datos.DatosSesionCliente)
|
||||
Try
|
||||
Dim fidentificacion As New frmIdentificacion
|
||||
Dim sr As tsl5.Interfaces.IServicioNR = Nothing
|
||||
Dim datconfapl As Datos.DatosConfiguracionAplicacion = Nothing
|
||||
Dim sFichConf As String
|
||||
If IO.File.Exists(FichConfDesarrollo) Then
|
||||
sFichConf = FichConfDesarrollo
|
||||
Else
|
||||
sFichConf = FichConfProduccion
|
||||
End If
|
||||
Dim bReintentar As Boolean = True
|
||||
Dim bCambiarConfiguracion As Boolean
|
||||
Dim bGuardarConfiguracion As Boolean
|
||||
Do
|
||||
If bReintentar Then
|
||||
If Not IO.File.Exists(sFichConf) Or bCambiarConfiguracion Then
|
||||
|
||||
Dim fConfig As New frmConfiguracionAplicacion
|
||||
Dim ServLocal As New tsl5.Datos.Servidor
|
||||
Dim ServRemoto As New tsl5.Datos.Servidor
|
||||
If datconfapl Is Nothing Then
|
||||
fConfig.tbRutaDatos.Text = IO.Path.GetDirectoryName(sFichConf) & "\datos\"
|
||||
fConfig.tbRutaTemporales.Text = IO.Path.GetDirectoryName(sFichConf) & "\tmp\"
|
||||
Else
|
||||
fConfig.tbRutaDatos.Text = datconfcli.ConstantesCliente.RutaDatos
|
||||
fConfig.tbRutaTemporales.Text = datconfcli.ConstantesCliente.RutaTmp
|
||||
For Each servidor In datconfapl.Servidores
|
||||
Try
|
||||
If servidor.Localizacion = LocalizacionesEnum.Local Then
|
||||
fConfig.tbServidorLocal.Text = servidor.Servidor
|
||||
fConfig.tbPuertoLocal.Text = servidor.Puerto
|
||||
Else
|
||||
fConfig.tbServidorRemoto.Text = servidor.Servidor
|
||||
fConfig.tbPuertoRemoto.Text = servidor.Puerto
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Next
|
||||
End If
|
||||
fConfig.tbServidorLocal.Focus()
|
||||
fConfig.ShowDialog()
|
||||
|
||||
|
||||
Dim conscli As New Datos.ConstantesCliente
|
||||
conscli.NombreServicio = NombreServicio
|
||||
conscli.RutaDatos = fConfig.tbRutaDatos.Text
|
||||
conscli.RutaTmp = fConfig.tbRutaTemporales.Text
|
||||
conscli.RutaAplicacion = Windows.Forms.Application.StartupPath
|
||||
datconfapl = New Datos.DatosConfiguracionAplicacion
|
||||
datconfapl.ConstantesCliente = conscli
|
||||
If fConfig.tbServidorLocal.Text.Trim <> "" Then
|
||||
ServLocal.Localizacion = LocalizacionesEnum.Local
|
||||
ServLocal.Servidor = fConfig.tbServidorLocal.Text
|
||||
ServLocal.Puerto = fConfig.tbPuertoLocal.Text
|
||||
datconfapl.Servidores.Add(ServLocal)
|
||||
End If
|
||||
If fConfig.tbServidorRemoto.Text.Trim <> "" Then
|
||||
ServRemoto.Localizacion = LocalizacionesEnum.Remoto
|
||||
ServRemoto.Servidor = fConfig.tbServidorRemoto.Text
|
||||
ServRemoto.Puerto = fConfig.tbPuertoRemoto.Text
|
||||
datconfapl.Servidores.Add(ServRemoto)
|
||||
End If
|
||||
bGuardarConfiguracion = True
|
||||
Else
|
||||
datconfapl = New Datos.DatosConfiguracionAplicacion
|
||||
datconfapl = tsl5.Utilidades.DeserializaFichero(sFichConf, datconfapl.GetType)
|
||||
End If
|
||||
End If
|
||||
Try
|
||||
Dim bConectado As Boolean = False
|
||||
For Each servidor In datconfapl.Servidores
|
||||
Try
|
||||
datconfcli = New Datos.DatosConfiguracionCliente
|
||||
datconfcli.ServidorActivo = servidor
|
||||
datconfcli.ConstantesCliente = datconfapl.ConstantesCliente
|
||||
datconfcli.NombreEjecutable = Process.GetCurrentProcess.ProcessName & ".exe"
|
||||
datconexcli = tsl5.Rutinas.ObtieneDatConexCliente(datconfcli, sr, 1)
|
||||
bConectado = True
|
||||
Exit For
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Next
|
||||
If Not bConectado Then Throw New Exception("No se ha podido conectar con ninguno de los servidores")
|
||||
If bGuardarConfiguracion Then
|
||||
If IO.File.Exists(sFichConf) Then IO.File.Delete(sFichConf)
|
||||
tsl5.Utilidades.CreaEstructuraDirectorio(IO.Path.GetDirectoryName(sFichConf))
|
||||
tsl5.Utilidades.CreaEstructuraDirectorio(datconfcli.ConstantesCliente.RutaDatos)
|
||||
tsl5.Utilidades.CreaEstructuraDirectorio(datconfcli.ConstantesCliente.RutaTmp)
|
||||
tsl5.Utilidades.serializar(datconfapl, sFichConf)
|
||||
End If
|
||||
|
||||
Exit Do
|
||||
Catch ex As Exception
|
||||
Select Case MsgBox(ex.Message & vbCrLf & "Pulse si para volver a intentar, 'no' para modificar la configuración, cancelar para salir de la aplicación", MsgBoxStyle.YesNoCancel, "¡Atención!")
|
||||
Case MsgBoxResult.No
|
||||
bReintentar = True
|
||||
If IO.File.Exists(sFichConf) Then IO.File.Delete(sFichConf)
|
||||
Case MsgBoxResult.Yes
|
||||
bReintentar = False
|
||||
|
||||
Case MsgBoxResult.Cancel
|
||||
Environment.Exit(0)
|
||||
End Select
|
||||
End Try
|
||||
Loop
|
||||
' tsl5.Rutinas.ActualizaCliente(datconfcli, datconexcli, sr) 'solo datos 20120614
|
||||
Dim exc As Exception = Nothing
|
||||
Dim idGrupoBD As Integer
|
||||
Do
|
||||
exc = Nothing
|
||||
Try
|
||||
If fidentificacion.ShowDialog = Windows.Forms.DialogResult.OK Then
|
||||
datsesioncli = sr.IniciaSesion(fidentificacion.tbUsuario.Text, fidentificacion.tbClave.Text, idGrupoBD, exc)
|
||||
If Not exc Is Nothing Then Throw exc
|
||||
Exit Do
|
||||
Else
|
||||
Environment.Exit(0)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Atención")
|
||||
End Try
|
||||
Loop
|
||||
If idGrupoBD <> 1 Then datconexcli = tsl5.Rutinas.ObtieneDatConexCliente(datconfcli, sr, idGrupoBD)
|
||||
tsl5.Rutinas.GeneraMenus(Formulario, datconexcli, datsesioncli, Evento)
|
||||
tcFormularios.CausesValidation = False
|
||||
Formulario.IsMdiContainer = True
|
||||
Dim c As Control
|
||||
For Each c In Formulario.Controls
|
||||
If TypeOf c Is MdiClient Then
|
||||
' '' c.BackColor = Color.FromArgb(8, 98, 83)
|
||||
c.BackColor = Color.White
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & vbCrLf & ex.StackTrace, MsgBoxStyle.Exclamation, "Error frmInicio_Load")
|
||||
Environment.Exit(0)
|
||||
Finally
|
||||
Formulario.Enabled = True
|
||||
End Try
|
||||
End Sub
|
||||
Public Shared Sub InicioClienteSinServicio(Aplicacion As String, Formulario As Form, tcFormularios As System.Windows.Forms.TabControl, FicheroConfServidor As String, FichConfProduccion As String, FichConfDesarrollo As String, Evento As EventHandler, ByRef datconfcli As Datos.DatosConfiguracionCliente, ByRef datconexcli As Datos.DatosConexionCliente, ByRef datsesioncli As Datos.DatosSesionCliente, Optional NumeroBDServicio As Integer = 0)
|
||||
Try
|
||||
Dim fidentificacion As New frmIdentificacion
|
||||
'Dim sr As tsl5.Interfaces.IServicioNR = Nothing
|
||||
Dim datconfapl As Datos.DatosConfiguracionAplicacion = Nothing
|
||||
Dim sFichConf As String
|
||||
If IO.File.Exists(FichConfDesarrollo) Then
|
||||
sFichConf = FichConfDesarrollo
|
||||
Else
|
||||
sFichConf = FichConfProduccion
|
||||
End If
|
||||
Dim bReintentar As Boolean = True
|
||||
Dim bCambiarConfiguracion As Boolean
|
||||
Dim bGuardarConfiguracion As Boolean
|
||||
Do
|
||||
If bReintentar Then
|
||||
If Not IO.File.Exists(sFichConf) Or bCambiarConfiguracion Then
|
||||
|
||||
Dim fConfig As New frmConfiguracionAplicacion
|
||||
Dim ServLocal As New tsl5.Datos.Servidor
|
||||
Dim ServRemoto As New tsl5.Datos.Servidor
|
||||
If datconfapl Is Nothing Then
|
||||
fConfig.tbRutaDatos.Text = IO.Path.GetDirectoryName(sFichConf) & "\datos\"
|
||||
fConfig.tbRutaTemporales.Text = IO.Path.GetDirectoryName(sFichConf) & "\tmp\"
|
||||
Else
|
||||
fConfig.tbRutaDatos.Text = datconfcli.ConstantesCliente.RutaDatos
|
||||
fConfig.tbRutaTemporales.Text = datconfcli.ConstantesCliente.RutaTmp
|
||||
For Each servidor In datconfapl.Servidores
|
||||
Try
|
||||
If servidor.Localizacion = LocalizacionesEnum.Local Then
|
||||
fConfig.tbServidorLocal.Text = servidor.Servidor
|
||||
fConfig.tbPuertoLocal.Text = servidor.Puerto
|
||||
Else
|
||||
fConfig.tbServidorRemoto.Text = servidor.Servidor
|
||||
fConfig.tbPuertoRemoto.Text = servidor.Puerto
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Next
|
||||
End If
|
||||
fConfig.tbServidorLocal.Focus()
|
||||
fConfig.ShowDialog()
|
||||
|
||||
|
||||
Dim conscli As New Datos.ConstantesCliente
|
||||
conscli.NombreServicio = ""
|
||||
conscli.RutaDatos = fConfig.tbRutaDatos.Text
|
||||
conscli.RutaTmp = fConfig.tbRutaTemporales.Text
|
||||
conscli.RutaAplicacion = Windows.Forms.Application.StartupPath
|
||||
datconfapl = New Datos.DatosConfiguracionAplicacion
|
||||
datconfapl.ConstantesCliente = conscli
|
||||
If fConfig.tbServidorLocal.Text.Trim <> "" Then
|
||||
ServLocal.Localizacion = LocalizacionesEnum.Local
|
||||
ServLocal.Servidor = fConfig.tbServidorLocal.Text
|
||||
ServLocal.Puerto = fConfig.tbPuertoLocal.Text
|
||||
datconfapl.Servidores.Add(ServLocal)
|
||||
End If
|
||||
If fConfig.tbServidorRemoto.Text.Trim <> "" Then
|
||||
ServRemoto.Localizacion = LocalizacionesEnum.Remoto
|
||||
ServRemoto.Servidor = fConfig.tbServidorRemoto.Text
|
||||
ServRemoto.Puerto = fConfig.tbPuertoRemoto.Text
|
||||
datconfapl.Servidores.Add(ServRemoto)
|
||||
End If
|
||||
bGuardarConfiguracion = True
|
||||
Else
|
||||
datconfapl = New Datos.DatosConfiguracionAplicacion
|
||||
datconfapl = tsl5.Utilidades.DeserializaFichero(sFichConf, datconfapl.GetType)
|
||||
End If
|
||||
End If
|
||||
Try
|
||||
Dim bConectado As Boolean = False
|
||||
For Each servidor In datconfapl.Servidores
|
||||
Try
|
||||
datconfcli = New Datos.DatosConfiguracionCliente
|
||||
datconfcli.ServidorActivo = servidor
|
||||
datconfcli.ConstantesCliente = datconfapl.ConstantesCliente
|
||||
datconfcli.NombreEjecutable = Process.GetCurrentProcess.ProcessName & ".exe"
|
||||
datconexcli = tsl5.Rutinas.ObtieneDatConexClienteSinServicio(FicheroConfServidor, datconfcli, 1)
|
||||
bConectado = True
|
||||
Exit For
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Next
|
||||
If Not bConectado Then Throw New Exception("No se ha podido conectar con ninguno de los servidores")
|
||||
If bGuardarConfiguracion Then
|
||||
If IO.File.Exists(sFichConf) Then IO.File.Delete(sFichConf)
|
||||
tsl5.Utilidades.CreaEstructuraDirectorio(IO.Path.GetDirectoryName(sFichConf))
|
||||
tsl5.Utilidades.CreaEstructuraDirectorio(datconfcli.ConstantesCliente.RutaDatos)
|
||||
tsl5.Utilidades.CreaEstructuraDirectorio(datconfcli.ConstantesCliente.RutaTmp)
|
||||
tsl5.Utilidades.serializar(datconfapl, sFichConf)
|
||||
End If
|
||||
|
||||
Exit Do
|
||||
Catch ex As Exception
|
||||
Select Case MsgBox(ex.Message & vbCrLf & "Pulse si para volver a intentar, 'no' para modificar la configuración, cancelar para salir de la aplicación", MsgBoxStyle.YesNoCancel, "¡Atención!")
|
||||
Case MsgBoxResult.No
|
||||
bReintentar = True
|
||||
If IO.File.Exists(sFichConf) Then IO.File.Delete(sFichConf)
|
||||
Case MsgBoxResult.Yes
|
||||
bReintentar = False
|
||||
|
||||
Case MsgBoxResult.Cancel
|
||||
Environment.Exit(0)
|
||||
End Select
|
||||
End Try
|
||||
Loop
|
||||
' tsl5.Rutinas.ActualizaCliente(datconfcli, datconexcli, sr) 'solo datos 20120614
|
||||
Dim exc As Exception = Nothing
|
||||
Dim idGrupoBD As Integer
|
||||
Do
|
||||
exc = Nothing
|
||||
Try
|
||||
If fidentificacion.ShowDialog = Windows.Forms.DialogResult.OK Then
|
||||
datsesioncli = IniciaSesionSinServicio(fidentificacion.tbUsuario.Text, fidentificacion.tbClave.Text, idGrupoBD, Aplicacion, exc)
|
||||
If Not exc Is Nothing Then Throw exc
|
||||
Exit Do
|
||||
Else
|
||||
Environment.Exit(0)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Atención")
|
||||
End Try
|
||||
Loop
|
||||
If idGrupoBD <> 1 Then datconexcli = tsl5.Rutinas.ObtieneDatConexClienteSinServicio(FicheroConfServidor, datconfcli, idGrupoBD)
|
||||
tsl5.Rutinas.GeneraMenus(Formulario, datconexcli, datsesioncli, Evento)
|
||||
tcFormularios.CausesValidation = False
|
||||
Formulario.IsMdiContainer = True
|
||||
Dim c As Control
|
||||
For Each c In Formulario.Controls
|
||||
If TypeOf c Is MdiClient Then
|
||||
' '' c.BackColor = Color.FromArgb(8, 98, 83)
|
||||
c.BackColor = Color.White
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & vbCrLf & ex.StackTrace, MsgBoxStyle.Exclamation, "Error frmInicio_Load")
|
||||
Environment.Exit(0)
|
||||
Finally
|
||||
Formulario.Enabled = True
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
145
InicioServicioYClientes/frmConfiguracionAplicacion.resx
Normal file
145
InicioServicioYClientes/frmConfiguracionAplicacion.resx
Normal file
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.typeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAABmMwD/ZjMA/2YzAP9mMwD/ZjMA/2YzAP9mMwD/ZjMA/2YzAP9mMwD/ZjMA/2Yz
|
||||
AP8AAAAAAAAAAAAAAABmMwD/////////////////////////////////////////////////////////
|
||||
////////ZjMA/wAAAABmMwD/////////////////////////////////////////////////////////
|
||||
//////////////////9mMwD/ZjMA////////////cEAQ/3BAEP9wQBD/cEAQ////////////cEAQ////
|
||||
//9wQBD/cEAQ////////////ZjMA/2YzAP////////////////9wQBD/cEAQ/////////////////3BA
|
||||
EP9wQBD//////3BAEP9wQBD//////2YzAP9mMwD/////////////////cEAQ/3BAEP//////////////
|
||||
//////////////////9wQBD/cEAQ//////9mMwD/ZjMA/////////////////3BAEP9wQBD/////////
|
||||
/////////////3BAEP9wQBD/cEAQ/3BAEP//////ZjMA/2YzAP////////////////9wQBD/cEAQ////
|
||||
/////////////3BAEP9wQBD/cEAQ/3BAEP///////////2YzAP9mMwD/////////////////cEAQ/3BA
|
||||
EP////////////////9wQBD/cEAQ//////////////////////9mMwD/ZjMA//////9wQBD//////3BA
|
||||
EP9wQBD//////3BAEP//////cEAQ/3BAEP//////cEAQ/3BAEP//////ZjMA/2YzAP//////cEAQ/3BA
|
||||
EP9wQBD/cEAQ/3BAEP9wQBD///////////9wQBD/cEAQ//////9wQBD//////2YzAP9mMwD/////////
|
||||
//////////////////////////////////////////////////////////////////9mMwD/AAAAAGYz
|
||||
AP////////////////////////////////////////////////////////////////9mMwD/AAAAAAAA
|
||||
AAAAAAAAZjMA/2YzAP9mMwD/ZjMA/2YzAP9mMwD/ZjMA/2YzAP9mMwD/ZjMA/2YzAP9mMwD/AAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAA//8AAMADAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAB
|
||||
AADAAwAA//8AAA==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
288
InicioServicioYClientes/frmConfiguracionAplicacion.vb
Normal file
288
InicioServicioYClientes/frmConfiguracionAplicacion.vb
Normal file
@@ -0,0 +1,288 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.OleDb
|
||||
Imports cablin.clFuncionesGenericas
|
||||
Imports cablin
|
||||
Public Class frmConfiguracionAplicacion
|
||||
Inherits System.Windows.Forms.Form
|
||||
Private bIdentificacionValida As Boolean
|
||||
Private WithEvents tlbBarraGenerica As New ucBarraGenerica
|
||||
Friend WithEvents tbPuertoLocal As System.Windows.Forms.textBox
|
||||
Friend WithEvents Label2 As System.Windows.Forms.Label
|
||||
Friend WithEvents tbRutaDatos As System.Windows.Forms.textBox
|
||||
Friend WithEvents Label4 As System.Windows.Forms.Label
|
||||
Friend WithEvents tbRutaTemporales As System.Windows.Forms.textBox
|
||||
Friend WithEvents Label5 As System.Windows.Forms.Label
|
||||
Friend WithEvents tbPuertoRemoto As System.Windows.Forms.textBox
|
||||
Friend WithEvents Label3 As System.Windows.Forms.Label
|
||||
Friend WithEvents tbServidorRemoto As System.Windows.Forms.textBox
|
||||
Friend WithEvents Label6 As System.Windows.Forms.Label
|
||||
Public WithEvents clCab As cablin.clCabLin
|
||||
'Friend NombreServicio As String
|
||||
'Friend Puerto As String
|
||||
'Friend FicheroConfig As String
|
||||
|
||||
|
||||
#Region " C<>digo generado por el Dise<73>ador de Windows Forms "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'El Dise<73>ador de Windows Forms requiere esta llamada.
|
||||
InitializeComponent()
|
||||
|
||||
'Agregar cualquier inicializaci<63>n despu<70>s de la llamada a InitializeComponent()
|
||||
|
||||
End Sub
|
||||
|
||||
'Form reemplaza a Dispose para limpiar la lista de componentes.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Requerido por el Dise<73>ador de Windows Forms
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTA: el Dise<73>ador de Windows Forms requiere el siguiente procedimiento
|
||||
'Puede modificarse utilizando el Dise<73>ador de Windows Forms.
|
||||
'No lo modifique con el editor de c<>digo.
|
||||
Friend WithEvents Estado As System.Windows.Forms.Label
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents tbServidorLocal As System.Windows.Forms.textBox
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfiguracionAplicacion))
|
||||
Me.Estado = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.tbServidorLocal = New System.Windows.Forms.textBox()
|
||||
Me.tbPuertoLocal = New System.Windows.Forms.textBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.tbRutaDatos = New System.Windows.Forms.textBox()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.tbRutaTemporales = New System.Windows.Forms.textBox()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.tbPuertoRemoto = New System.Windows.Forms.textBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.tbServidorRemoto = New System.Windows.Forms.textBox()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Estado
|
||||
'
|
||||
Me.Estado.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
|
||||
Me.Estado.ForeColor = System.Drawing.Color.Red
|
||||
Me.Estado.Location = New System.Drawing.Point(16, 64)
|
||||
Me.Estado.Name = "Estado"
|
||||
Me.Estado.Size = New System.Drawing.Size(653, 16)
|
||||
Me.Estado.tabIndex = 19
|
||||
Me.Estado.text = "Estado:"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Location = New System.Drawing.Point(21, 99)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(138, 16)
|
||||
Me.Label1.tabIndex = 28
|
||||
Me.Label1.text = "Servidor Local:"
|
||||
'
|
||||
'tbServidorLocal
|
||||
'
|
||||
Me.tbServidorLocal.Location = New System.Drawing.Point(173, 95)
|
||||
Me.tbServidorLocal.Name = "tbServidorLocal"
|
||||
Me.tbServidorLocal.Size = New System.Drawing.Size(196, 20)
|
||||
Me.tbServidorLocal.tabIndex = 27
|
||||
Me.tbServidorLocal.tag = "IND:1|NBD:N-E:ServidorLocal|USC:1"
|
||||
'
|
||||
'tbPuertoLocal
|
||||
'
|
||||
Me.tbPuertoLocal.Location = New System.Drawing.Point(173, 121)
|
||||
Me.tbPuertoLocal.Name = "tbPuertoLocal"
|
||||
Me.tbPuertoLocal.Size = New System.Drawing.Size(196, 20)
|
||||
Me.tbPuertoLocal.tabIndex = 29
|
||||
Me.tbPuertoLocal.tag = "IND:2|NBD:N-E:PuertoLocal|USC:1"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.Location = New System.Drawing.Point(21, 125)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(138, 16)
|
||||
Me.Label2.tabIndex = 30
|
||||
Me.Label2.text = "Puerto Local:"
|
||||
'
|
||||
'tbRutaDatos
|
||||
'
|
||||
Me.tbRutaDatos.Location = New System.Drawing.Point(173, 224)
|
||||
Me.tbRutaDatos.Name = "tbRutaDatos"
|
||||
Me.tbRutaDatos.Size = New System.Drawing.Size(496, 20)
|
||||
Me.tbRutaDatos.tabIndex = 33
|
||||
Me.tbRutaDatos.tag = "IND:5|NBD:N-E:RutaDatos|BCO:O|USC:1"
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.Location = New System.Drawing.Point(21, 229)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(138, 16)
|
||||
Me.Label4.tabIndex = 34
|
||||
Me.Label4.text = "Ruta Datos:"
|
||||
'
|
||||
'tbRutaTemporales
|
||||
'
|
||||
Me.tbRutaTemporales.Location = New System.Drawing.Point(173, 251)
|
||||
Me.tbRutaTemporales.Name = "tbRutaTemporales"
|
||||
Me.tbRutaTemporales.Size = New System.Drawing.Size(496, 20)
|
||||
Me.tbRutaTemporales.tabIndex = 35
|
||||
Me.tbRutaTemporales.tag = "IND:6|NBD:N-E:RutaFicherosTemporales|BCO:O|USC:1"
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.Location = New System.Drawing.Point(21, 256)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(138, 16)
|
||||
Me.Label5.tabIndex = 36
|
||||
Me.Label5.text = "Ruta Ficheros Temporales:"
|
||||
'
|
||||
'tbPuertoRemoto
|
||||
'
|
||||
Me.tbPuertoRemoto.Location = New System.Drawing.Point(173, 186)
|
||||
Me.tbPuertoRemoto.Name = "tbPuertoRemoto"
|
||||
Me.tbPuertoRemoto.Size = New System.Drawing.Size(196, 20)
|
||||
Me.tbPuertoRemoto.tabIndex = 39
|
||||
Me.tbPuertoRemoto.tag = "IND:4|NBD:N-E:PuertoRemoto|BCO:O|USC:1"
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.Location = New System.Drawing.Point(21, 190)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(138, 16)
|
||||
Me.Label3.tabIndex = 40
|
||||
Me.Label3.text = "Puerto Remoto:"
|
||||
'
|
||||
'tbServidorRemoto
|
||||
'
|
||||
Me.tbServidorRemoto.Location = New System.Drawing.Point(173, 160)
|
||||
Me.tbServidorRemoto.Name = "tbServidorRemoto"
|
||||
Me.tbServidorRemoto.Size = New System.Drawing.Size(196, 20)
|
||||
Me.tbServidorRemoto.tabIndex = 37
|
||||
Me.tbServidorRemoto.tag = "IND:3|NBD:N-E:ServidorRemoto|USC:1"
|
||||
'
|
||||
'Label6
|
||||
'
|
||||
Me.Label6.Location = New System.Drawing.Point(21, 164)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(138, 16)
|
||||
Me.Label6.tabIndex = 38
|
||||
Me.Label6.text = "Servidor Remoto:"
|
||||
'
|
||||
'frmConfiguracionAplicacion
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.ClientSize = New System.Drawing.Size(681, 345)
|
||||
Me.ControlBox = False
|
||||
Me.Controls.Add(Me.tbPuertoRemoto)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.tbServidorRemoto)
|
||||
Me.Controls.Add(Me.Label6)
|
||||
Me.Controls.Add(Me.tbRutaTemporales)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.tbRutaDatos)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Controls.Add(Me.tbPuertoLocal)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.tbServidorLocal)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.Estado)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.KeyPreview = True
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmConfiguracionAplicacion"
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.tag = "APSB:S"
|
||||
Me.text = "Configuraci<EFBFBD>n de la Aplicaci<63>n"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub frmcambioPin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
Call AgregaBarraGenerica(Me, CType(tlbBarraGenerica, Object))
|
||||
clCab = New clCabLin(Me, "Instalacion", Nothing)
|
||||
Me.tlbBarraGenerica.tlbSiguiente.Enabled = False
|
||||
Me.tlbBarraGenerica.tlbSiguiente.Visible = False
|
||||
Me.tlbBarraGenerica.tlbAlmacenar.Visible = True
|
||||
Me.tlbBarraGenerica.tlbAlmacenar.Enabled = True
|
||||
Me.tlbBarraGenerica.tlbLimpiarPantalla.Visible = False
|
||||
Me.tlbBarraGenerica.tlbSalir.Enabled = True
|
||||
Me.tlbBarraGenerica.tlbEliminaFicha.Visible = False
|
||||
clCab.Estado = "Introduzca Datos"
|
||||
|
||||
Call RedibujaBarraGenerica(tlbBarraGenerica.tbGenerico)
|
||||
End Sub
|
||||
Private Sub clCab_DespuesFPulsado(ByVal Tecla As String) Handles clCab.DespuesFPulsado
|
||||
Select Case Tecla
|
||||
Case "1"
|
||||
Try
|
||||
If Me.tbServidorLocal.text <> "" Then
|
||||
If Me.tbPuertoLocal.text = "" Then
|
||||
Throw New Exception("Si especifica un servidor local, debe especificar el puerto de conexi<78>n Local")
|
||||
End If
|
||||
End If
|
||||
If Me.tbPuertoLocal.text <> "" Then
|
||||
If Me.tbServidorLocal.text = "" Then
|
||||
Throw New Exception("Si especifica un puerto local, debe especificar el servidor de conexi<78>n Local")
|
||||
End If
|
||||
End If
|
||||
If Me.tbServidorRemoto.text <> "" Then
|
||||
If Me.tbPuertoRemoto.text = "" Then
|
||||
Throw New Exception("Si especifica un servidor remoto, debe especificar el puerto de conexi<78>n remoto")
|
||||
End If
|
||||
End If
|
||||
If Me.tbPuertoRemoto.text <> "" Then
|
||||
If Me.tbServidorRemoto.text = "" Then
|
||||
Throw New Exception("Si especifica un puerto remoto, debe especificar el servidor de conexi<78>n remoto")
|
||||
End If
|
||||
End If
|
||||
If Me.tbServidorRemoto.text = "" And Me.tbServidorLocal.text = "" Then
|
||||
Throw New Exception("Debe especificar al menos un servidor")
|
||||
End If
|
||||
Me.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error")
|
||||
' Environment.Exit(0)
|
||||
End Try
|
||||
Case "8"
|
||||
Environment.Exit(0)
|
||||
End Select
|
||||
End Sub
|
||||
Public Shared Sub RedibujaBarraGenerica(ByVal BarraHerramientas As Windows.Forms.ToolBar)
|
||||
Try
|
||||
Dim butBoton As Windows.Forms.ToolBarButton, iNumbotones As Integer
|
||||
For Each butBoton In BarraHerramientas.Buttons
|
||||
If butBoton.Visible Then
|
||||
iNumbotones += 1
|
||||
End If
|
||||
Next
|
||||
BarraHerramientas.Width = (BarraHerramientas.ButtonSize.Width * iNumbotones) + 10
|
||||
BarraHerramientas.Parent.Width = BarraHerramientas.Width
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ". En Redibujabarragenerica" & vbCrLf & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Private Sub frmSeleccionInstalacion_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
|
||||
' e.Cancel = Not bIdentificacionValida
|
||||
'End Sub
|
||||
|
||||
Private Sub frmConfiguracionAplicacion_Shown(sender As Object, e As System.EventArgs) Handles Me.Shown
|
||||
|
||||
|
||||
tbServidorLocal.Focus()
|
||||
End Sub
|
||||
End Class
|
||||
120
InicioServicioYClientes/frmIdentificacion.resx
Normal file
120
InicioServicioYClientes/frmIdentificacion.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.typeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
167
InicioServicioYClientes/frmIdentificacion.vb
Normal file
167
InicioServicioYClientes/frmIdentificacion.vb
Normal file
@@ -0,0 +1,167 @@
|
||||
Public Class frmIdentificacion
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
|
||||
#Region " C<>digo generado por el Dise<73>ador de Windows Forms "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'El Dise<73>ador de Windows Forms requiere esta llamada.
|
||||
InitializeComponent()
|
||||
|
||||
'Agregar cualquier inicializaci<63>n despu<70>s de la llamada a InitializeComponent()
|
||||
|
||||
End Sub
|
||||
|
||||
'Form reemplaza a Dispose para limpiar la lista de componentes.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Requerido por el Dise<73>ador de Windows Forms
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTA: el Dise<73>ador de Windows Forms requiere el siguiente procedimiento
|
||||
'Puede modificarse utilizando el Dise<73>ador de Windows Forms.
|
||||
'No lo modifique con el editor de c<>digo.
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents tbClave As System.Windows.Forms.textBox
|
||||
Friend WithEvents Label5 As System.Windows.Forms.Label
|
||||
Friend WithEvents IniciarSesion As System.Windows.Forms.Button
|
||||
Friend WithEvents Cancelar As System.Windows.Forms.Button
|
||||
Friend WithEvents tbUsuario As System.Windows.Forms.textBox
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.tbClave = New System.Windows.Forms.textBox()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.tbUsuario = New System.Windows.Forms.textBox()
|
||||
Me.IniciarSesion = New System.Windows.Forms.Button()
|
||||
Me.Cancelar = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label1.Location = New System.Drawing.Point(23, 49)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(144, 16)
|
||||
Me.Label1.tabIndex = 28
|
||||
Me.Label1.text = "Clave Acceso:"
|
||||
'
|
||||
'tbClave
|
||||
'
|
||||
Me.tbClave.Location = New System.Drawing.Point(136, 49)
|
||||
Me.tbClave.Name = "tbClave"
|
||||
Me.tbClave.PasswordChar = Global.Microsoft.VisualBasic.ChrW(42)
|
||||
Me.tbClave.Size = New System.Drawing.Size(142, 20)
|
||||
Me.tbClave.tabIndex = 1
|
||||
Me.tbClave.tag = "IND:2|NBD:Clave_Acceso"
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label5.Location = New System.Drawing.Point(23, 23)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(107, 16)
|
||||
Me.Label5.tabIndex = 46
|
||||
Me.Label5.text = "C<EFBFBD>digo Usuario.:"
|
||||
'
|
||||
'tbUsuario
|
||||
'
|
||||
Me.tbUsuario.Location = New System.Drawing.Point(136, 20)
|
||||
Me.tbUsuario.Name = "tbUsuario"
|
||||
Me.tbUsuario.Size = New System.Drawing.Size(142, 20)
|
||||
Me.tbUsuario.tabIndex = 0
|
||||
Me.tbUsuario.tag = "IND:1|NBD:Codigo"
|
||||
'
|
||||
'IniciarSesion
|
||||
'
|
||||
Me.IniciarSesion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.IniciarSesion.Location = New System.Drawing.Point(168, 85)
|
||||
Me.IniciarSesion.Name = "IniciarSesion"
|
||||
Me.IniciarSesion.Size = New System.Drawing.Size(110, 23)
|
||||
Me.IniciarSesion.tabIndex = 2
|
||||
Me.IniciarSesion.text = "&Iniciar Sesi<73>n"
|
||||
Me.IniciarSesion.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Cancelar
|
||||
'
|
||||
Me.Cancelar.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.Cancelar.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Cancelar.Location = New System.Drawing.Point(26, 85)
|
||||
Me.Cancelar.Name = "Cancelar"
|
||||
Me.Cancelar.Size = New System.Drawing.Size(110, 23)
|
||||
Me.Cancelar.tabIndex = 3
|
||||
Me.Cancelar.text = "&Cancelar"
|
||||
Me.Cancelar.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmIdentificacion
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.CancelButton = Me.Cancelar
|
||||
Me.ClientSize = New System.Drawing.Size(302, 125)
|
||||
Me.ControlBox = False
|
||||
Me.Controls.Add(Me.Cancelar)
|
||||
Me.Controls.Add(Me.IniciarSesion)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.tbUsuario)
|
||||
Me.Controls.Add(Me.tbClave)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
|
||||
Me.KeyPreview = True
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmIdentificacion"
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.tag = ""
|
||||
Me.text = "Identificaci<EFBFBD>n"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Private Sub IniciarSesion_Click(sender As System.Object, e As System.EventArgs) Handles IniciarSesion.Click
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
End Sub
|
||||
|
||||
Private Sub frmIdentificacion_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
|
||||
'If e.KeyCode = Keys.Enter Then
|
||||
' If Not (tbUsuario.text <> "" And tbClave.text <> "") Then
|
||||
' e.Handled = True
|
||||
' If Me.ActiveControl Is tbClave Then
|
||||
' tbUsuario.Focus()
|
||||
' Else
|
||||
' tbClave.Focus()
|
||||
' End If
|
||||
' Else
|
||||
' Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmIdentificacion_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
|
||||
If e.KeyChar = Chr(13) Then
|
||||
e.Handled = True
|
||||
If Not (tbUsuario.text <> "" And tbClave.text <> "") Then
|
||||
If Me.ActiveControl Is tbClave Then
|
||||
tbUsuario.Focus()
|
||||
Else
|
||||
tbClave.Focus()
|
||||
End If
|
||||
Else
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
1311
InicioServicioYClientes/ucBarraGenerica.resx
Normal file
1311
InicioServicioYClientes/ucBarraGenerica.resx
Normal file
File diff suppressed because it is too large
Load Diff
342
InicioServicioYClientes/ucBarraGenerica.vb
Normal file
342
InicioServicioYClientes/ucBarraGenerica.vb
Normal file
@@ -0,0 +1,342 @@
|
||||
|
||||
Public Class ucBarraGenerica
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
Public Event ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.toolBarButtonClickEventArgs)
|
||||
|
||||
#Region " C<>digo generado por el Dise<73>ador de Windows Forms "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'El Dise<73>ador de Windows Forms requiere esta llamada.
|
||||
InitializeComponent()
|
||||
|
||||
'Agregar cualquier inicializaci<63>n despu<70>s de la llamada a InitializeComponent()
|
||||
|
||||
End Sub
|
||||
|
||||
'UserControl reemplaza a Dispose para limpiar la lista de componentes.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Requerido por el Dise<73>ador de Windows Forms
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTA: el Dise<73>ador de Windows Forms requiere el siguiente procedimiento
|
||||
'Puede modificarse utilizando el Dise<73>ador de Windows Forms.
|
||||
'No lo modifique con el editor de c<>digo.
|
||||
Friend WithEvents Botones As System.Windows.Forms.ImageList
|
||||
Public WithEvents tlbSiguiente As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents TlbCrearPdf As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tlbVisualizarPDF As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tlbLimpiarPantalla As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tlbAlmacenar As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tlbEliminaFicha As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tlbAyuda As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tlbEnviar As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tlbRecibir As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tlbCancelar As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tlbGrabar As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tlbCopiar As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tlbSalir As System.Windows.Forms.toolBarButton
|
||||
Public WithEvents tbGenerico As System.Windows.Forms.toolBar
|
||||
Public WithEvents tlbRecibirdeDisco As System.Windows.Forms.toolBarButton
|
||||
Friend WithEvents tlbSolicitarCertificado As System.Windows.Forms.toolBarButton
|
||||
Friend WithEvents tlbVerCertificado As System.Windows.Forms.toolBarButton
|
||||
Friend WithEvents tlbCambiarPIN As System.Windows.Forms.toolBarButton
|
||||
Friend WithEvents tlbExportarCertificado As System.Windows.Forms.toolBarButton
|
||||
Friend WithEvents tlbRestaurarCopia As System.Windows.Forms.toolBarButton
|
||||
Friend WithEvents tlbImprimir As System.Windows.Forms.toolBarButton
|
||||
Friend WithEvents tlbRevocarCertificado As System.Windows.Forms.toolBarButton
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim tlbAnterior As System.Windows.Forms.toolBarButton
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ucBarraGenerica))
|
||||
Me.tbGenerico = New System.Windows.Forms.toolBar()
|
||||
Me.tlbSiguiente = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbCrearPdf = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbVisualizarPDF = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbAlmacenar = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbLimpiarPantalla = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbEliminaFicha = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbEnviar = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbGrabar = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbCopiar = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbRecibir = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbRecibirdeDisco = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbCancelar = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbAyuda = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbSolicitarCertificado = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbVerCertificado = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbCambiarPIN = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbExportarCertificado = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbRevocarCertificado = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbRestaurarCopia = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbImprimir = New System.Windows.Forms.toolBarButton()
|
||||
Me.tlbSalir = New System.Windows.Forms.toolBarButton()
|
||||
Me.Botones = New System.Windows.Forms.ImageList(Me.components)
|
||||
tlbAnterior = New System.Windows.Forms.toolBarButton()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'tlbAnterior
|
||||
'
|
||||
tlbAnterior.Enabled = False
|
||||
tlbAnterior.ImageIndex = 2
|
||||
tlbAnterior.Name = "tlbAnterior"
|
||||
tlbAnterior.tag = "NOM:ANTERIOR"
|
||||
tlbAnterior.toolTipText = "Anterior (F4)"
|
||||
tlbAnterior.Visible = False
|
||||
'
|
||||
'tbGenerico
|
||||
'
|
||||
Me.tbGenerico.AutoSize = False
|
||||
Me.tbGenerico.Buttons.AddRange(New System.Windows.Forms.toolBarButton() {tlbAnterior, Me.tlbSiguiente, Me.tlbCrearPdf, Me.tlbVisualizarPDF, Me.tlbAlmacenar, Me.tlbLimpiarPantalla, Me.tlbEliminaFicha, Me.tlbEnviar, Me.tlbGrabar, Me.tlbCopiar, Me.tlbRecibir, Me.tlbRecibirdeDisco, Me.tlbCancelar, Me.tlbAyuda, Me.tlbSolicitarCertificado, Me.tlbVerCertificado, Me.tlbCambiarPIN, Me.tlbExportarCertificado, Me.tlbRevocarCertificado, Me.tlbRestaurarCopia, Me.tlbImprimir, Me.tlbSalir})
|
||||
Me.tbGenerico.Dock = System.Windows.Forms.DockStyle.None
|
||||
Me.tbGenerico.DropDownArrows = True
|
||||
Me.tbGenerico.ImageList = Me.Botones
|
||||
Me.tbGenerico.Location = New System.Drawing.Point(0, 0)
|
||||
Me.tbGenerico.Name = "tbGenerico"
|
||||
Me.tbGenerico.ShowToolTips = True
|
||||
Me.tbGenerico.Size = New System.Drawing.Size(765, 44)
|
||||
Me.tbGenerico.tabIndex = 46
|
||||
Me.tbGenerico.tag = "FUN:S"
|
||||
'
|
||||
'tlbSiguiente
|
||||
'
|
||||
Me.tlbSiguiente.Enabled = False
|
||||
Me.tlbSiguiente.ImageIndex = 0
|
||||
Me.tlbSiguiente.Name = "tlbSiguiente"
|
||||
Me.tlbSiguiente.tag = "NOM:SIGUIENTE|FUN:5"
|
||||
Me.tlbSiguiente.toolTipText = "Siguiente (F5)"
|
||||
Me.tlbSiguiente.Visible = False
|
||||
'
|
||||
'TlbCrearPdf
|
||||
'
|
||||
Me.tlbCrearPdf.Enabled = False
|
||||
Me.tlbCrearPdf.ImageIndex = 4
|
||||
Me.tlbCrearPdf.Name = "TlbCrearPdf"
|
||||
Me.tlbCrearPdf.tag = "NOM:CREARPDF"
|
||||
Me.tlbCrearPdf.toolTipText = "Crear PDF"
|
||||
Me.tlbCrearPdf.Visible = False
|
||||
'
|
||||
'tlbVisualizarPDF
|
||||
'
|
||||
Me.tlbVisualizarPDF.Enabled = False
|
||||
Me.tlbVisualizarPDF.ImageIndex = 7
|
||||
Me.tlbVisualizarPDF.Name = "tlbVisualizarPDF"
|
||||
Me.tlbVisualizarPDF.tag = "NOM:VISUALIZARPDF"
|
||||
Me.tlbVisualizarPDF.toolTipText = "Visualizar PDF"
|
||||
Me.tlbVisualizarPDF.Visible = False
|
||||
'
|
||||
'tlbAlmacenar
|
||||
'
|
||||
Me.tlbAlmacenar.Enabled = False
|
||||
Me.tlbAlmacenar.ImageIndex = 5
|
||||
Me.tlbAlmacenar.Name = "tlbAlmacenar"
|
||||
Me.tlbAlmacenar.tag = "NOM:ALMCENAR|FUN:1|IMGN:26|IMGA:5"
|
||||
Me.tlbAlmacenar.toolTipText = "Almacenar (F1)"
|
||||
'
|
||||
'tlbLimpiarPantalla
|
||||
'
|
||||
Me.tlbLimpiarPantalla.Enabled = False
|
||||
Me.tlbLimpiarPantalla.ImageIndex = 13
|
||||
Me.tlbLimpiarPantalla.Name = "tlbLimpiarPantalla"
|
||||
Me.tlbLimpiarPantalla.tag = "NOM:LIMPIARPANTALLA|FUN:6"
|
||||
Me.tlbLimpiarPantalla.toolTipText = "Limpiar Pantalla (F6)"
|
||||
'
|
||||
'tlbEliminaFicha
|
||||
'
|
||||
Me.tlbEliminaFicha.Enabled = False
|
||||
Me.tlbEliminaFicha.ImageIndex = 11
|
||||
Me.tlbEliminaFicha.Name = "tlbEliminaFicha"
|
||||
Me.tlbEliminaFicha.tag = "NOM:ELIMINAFICHA|FUN:7"
|
||||
Me.tlbEliminaFicha.toolTipText = "Elimina Ficha (F7)"
|
||||
'
|
||||
'tlbEnviar
|
||||
'
|
||||
Me.tlbEnviar.Enabled = False
|
||||
Me.tlbEnviar.ImageIndex = 19
|
||||
Me.tlbEnviar.Name = "tlbEnviar"
|
||||
Me.tlbEnviar.tag = "NOM:ENVIAR"
|
||||
Me.tlbEnviar.toolTipText = "Enviar por internet"
|
||||
Me.tlbEnviar.Visible = False
|
||||
'
|
||||
'tlbGrabar
|
||||
'
|
||||
Me.tlbGrabar.Enabled = False
|
||||
Me.tlbGrabar.ImageIndex = 16
|
||||
Me.tlbGrabar.Name = "tlbGrabar"
|
||||
Me.tlbGrabar.tag = "NOM:GRABAR"
|
||||
Me.tlbGrabar.toolTipText = "Grabar en CD / DVD"
|
||||
Me.tlbGrabar.Visible = False
|
||||
'
|
||||
'tlbCopiar
|
||||
'
|
||||
Me.tlbCopiar.Enabled = False
|
||||
Me.tlbCopiar.ImageIndex = 17
|
||||
Me.tlbCopiar.Name = "tlbCopiar"
|
||||
Me.tlbCopiar.tag = "NOM:COPIAR|FUN:4"
|
||||
Me.tlbCopiar.toolTipText = "Copiar (F4)"
|
||||
Me.tlbCopiar.Visible = False
|
||||
'
|
||||
'tlbRecibir
|
||||
'
|
||||
Me.tlbRecibir.Enabled = False
|
||||
Me.tlbRecibir.ImageIndex = 20
|
||||
Me.tlbRecibir.Name = "tlbRecibir"
|
||||
Me.tlbRecibir.tag = "NOM:RECIBIR"
|
||||
Me.tlbRecibir.toolTipText = "Recibir de Internet"
|
||||
Me.tlbRecibir.Visible = False
|
||||
'
|
||||
'tlbRecibirdeDisco
|
||||
'
|
||||
Me.tlbRecibirdeDisco.Enabled = False
|
||||
Me.tlbRecibirdeDisco.ImageIndex = 18
|
||||
Me.tlbRecibirdeDisco.Name = "tlbRecibirdeDisco"
|
||||
Me.tlbRecibirdeDisco.tag = "NOM:RECIBIRDEDISCO"
|
||||
Me.tlbRecibirdeDisco.toolTipText = "Incorporar datos desde disco"
|
||||
Me.tlbRecibirdeDisco.Visible = False
|
||||
'
|
||||
'tlbCancelar
|
||||
'
|
||||
Me.tlbCancelar.Enabled = False
|
||||
Me.tlbCancelar.ImageIndex = 6
|
||||
Me.tlbCancelar.Name = "tlbCancelar"
|
||||
Me.tlbCancelar.tag = "NOM:CANCELAR"
|
||||
Me.tlbCancelar.toolTipText = "Cancelar"
|
||||
Me.tlbCancelar.Visible = False
|
||||
'
|
||||
'tlbAyuda
|
||||
'
|
||||
Me.tlbAyuda.Enabled = False
|
||||
Me.tlbAyuda.ImageIndex = 8
|
||||
Me.tlbAyuda.Name = "tlbAyuda"
|
||||
Me.tlbAyuda.tag = "NOM:AYUDA"
|
||||
Me.tlbAyuda.toolTipText = "Ayuda"
|
||||
Me.tlbAyuda.Visible = False
|
||||
'
|
||||
'tlbSolicitarCertificado
|
||||
'
|
||||
Me.tlbSolicitarCertificado.ImageIndex = 24
|
||||
Me.tlbSolicitarCertificado.Name = "tlbSolicitarCertificado"
|
||||
Me.tlbSolicitarCertificado.tag = "NOM:SolicitarCertificado|FUN:SOLICITARCERTIFICADO|VCO:S"
|
||||
Me.tlbSolicitarCertificado.toolTipText = "Importar un certificado"
|
||||
Me.tlbSolicitarCertificado.Visible = False
|
||||
'
|
||||
'tlbVerCertificado
|
||||
'
|
||||
Me.tlbVerCertificado.ImageIndex = 25
|
||||
Me.tlbVerCertificado.Name = "tlbVerCertificado"
|
||||
Me.tlbVerCertificado.tag = "NOM:VerCertificado"
|
||||
Me.tlbVerCertificado.toolTipText = "Ver Certificado"
|
||||
Me.tlbVerCertificado.Visible = False
|
||||
'
|
||||
'tlbCambiarPIN
|
||||
'
|
||||
Me.tlbCambiarPIN.ImageIndex = 21
|
||||
Me.tlbCambiarPIN.Name = "tlbCambiarPIN"
|
||||
Me.tlbCambiarPIN.tag = "NOM:CambiarPIN"
|
||||
Me.tlbCambiarPIN.toolTipText = "Cambiar PIN del certificado"
|
||||
Me.tlbCambiarPIN.Visible = False
|
||||
'
|
||||
'tlbExportarCertificado
|
||||
'
|
||||
Me.tlbExportarCertificado.ImageIndex = 22
|
||||
Me.tlbExportarCertificado.Name = "tlbExportarCertificado"
|
||||
Me.tlbExportarCertificado.tag = "NOM:ExportarCertificado"
|
||||
Me.tlbExportarCertificado.toolTipText = "Exportar el certificado"
|
||||
Me.tlbExportarCertificado.Visible = False
|
||||
'
|
||||
'tlbRevocarCertificado
|
||||
'
|
||||
Me.tlbRevocarCertificado.ImageIndex = 23
|
||||
Me.tlbRevocarCertificado.Name = "tlbRevocarCertificado"
|
||||
Me.tlbRevocarCertificado.tag = "NOM:RevocarCertificado"
|
||||
Me.tlbRevocarCertificado.toolTipText = "Revocar el certificado"
|
||||
Me.tlbRevocarCertificado.Visible = False
|
||||
'
|
||||
'tlbRestaurarCopia
|
||||
'
|
||||
Me.tlbRestaurarCopia.ImageIndex = 28
|
||||
Me.tlbRestaurarCopia.Name = "tlbRestaurarCopia"
|
||||
Me.tlbRestaurarCopia.tag = "NOM:RestaurarCopia"
|
||||
Me.tlbRestaurarCopia.toolTipText = "Restaurar copia de seguridad"
|
||||
Me.tlbRestaurarCopia.Visible = False
|
||||
'
|
||||
'tlbImprimir
|
||||
'
|
||||
Me.tlbImprimir.ImageIndex = 29
|
||||
Me.tlbImprimir.Name = "tlbImprimir"
|
||||
Me.tlbImprimir.tag = "NOM:IMPRIMIR|FUN:9"
|
||||
Me.tlbImprimir.toolTipText = "Imprimir (F9)"
|
||||
Me.tlbImprimir.Visible = False
|
||||
'
|
||||
'tlbSalir
|
||||
'
|
||||
Me.tlbSalir.Enabled = False
|
||||
Me.tlbSalir.ImageIndex = 3
|
||||
Me.tlbSalir.Name = "tlbSalir"
|
||||
Me.tlbSalir.tag = "NOM:SALIR|FUN:8"
|
||||
Me.tlbSalir.toolTipText = "Salir (F8)"
|
||||
'
|
||||
'Botones
|
||||
'
|
||||
Me.Botones.ImageStream = CType(resources.GetObject("Botones.ImageStream"), System.Windows.Forms.ImageListStreamer)
|
||||
Me.Botones.transparentColor = System.Drawing.Color.Blue
|
||||
Me.Botones.Images.SetKeyName(0, "")
|
||||
Me.Botones.Images.SetKeyName(1, "")
|
||||
Me.Botones.Images.SetKeyName(2, "")
|
||||
Me.Botones.Images.SetKeyName(3, "")
|
||||
Me.Botones.Images.SetKeyName(4, "")
|
||||
Me.Botones.Images.SetKeyName(5, "")
|
||||
Me.Botones.Images.SetKeyName(6, "")
|
||||
Me.Botones.Images.SetKeyName(7, "")
|
||||
Me.Botones.Images.SetKeyName(8, "")
|
||||
Me.Botones.Images.SetKeyName(9, "")
|
||||
Me.Botones.Images.SetKeyName(10, "")
|
||||
Me.Botones.Images.SetKeyName(11, "")
|
||||
Me.Botones.Images.SetKeyName(12, "")
|
||||
Me.Botones.Images.SetKeyName(13, "")
|
||||
Me.Botones.Images.SetKeyName(14, "")
|
||||
Me.Botones.Images.SetKeyName(15, "")
|
||||
Me.Botones.Images.SetKeyName(16, "")
|
||||
Me.Botones.Images.SetKeyName(17, "")
|
||||
Me.Botones.Images.SetKeyName(18, "")
|
||||
Me.Botones.Images.SetKeyName(19, "")
|
||||
Me.Botones.Images.SetKeyName(20, "")
|
||||
Me.Botones.Images.SetKeyName(21, "")
|
||||
Me.Botones.Images.SetKeyName(22, "")
|
||||
Me.Botones.Images.SetKeyName(23, "")
|
||||
Me.Botones.Images.SetKeyName(24, "")
|
||||
Me.Botones.Images.SetKeyName(25, "")
|
||||
Me.Botones.Images.SetKeyName(26, "")
|
||||
Me.Botones.Images.SetKeyName(27, "folder_time.png")
|
||||
Me.Botones.Images.SetKeyName(28, "data_time.png")
|
||||
Me.Botones.Images.SetKeyName(29, "printer.png")
|
||||
'
|
||||
'ucBarraGenerica
|
||||
'
|
||||
Me.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.Controls.Add(Me.tbGenerico)
|
||||
Me.Name = "ucBarraGenerica"
|
||||
Me.Size = New System.Drawing.Size(768, 48)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub tbGenerico_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.toolBarButtonClickEventArgs) Handles tbGenerico.ButtonClick
|
||||
Try
|
||||
RaiseEvent ButtonClick(sender, e)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error tbGenerico_ButtonClick")
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user