Hi all,
How can use BackgroundWorker or Threading for my code. I update TreeView (Winforms) and I call WCF service.
Any suggestions please. Kind regards.
Thanks in advance
AdministradorUILogging.TrazarDebug(
"PanelArbolFicheros. tslGuardarArbol_Click")
Dim listaFichero As New List(Of Fichero)
Windows.Forms.Cursor.Current = Cursors.WaitCursor
Me.TreeViewGB1.SuspendUpdate()
For Each nodo As NodoArbol In TreeViewGB1.Nodes
ProcesarNodo(nodo, listaFichero)
Next
Me.TreeViewGB1.ResumeUpdate()
' Cambiamos el cursor , tener en cuena si hacerlo asincrono
Try
Using bfll As New ComunBfll()
bfll.AltaManualListaFicheros(listaFichero)
Mensajes.InformacionGuardada()
End Using
Catch ex As WCF.ServicioBase.Contrato.Excepciones.NoExisteOperacionException
Mensajes.AdvertenciaErrores(
"No existe la operación")
Catch ex As WCF.ServicioBase.Contrato.Excepciones.NoExisteExpedienteException
Mensajes.AdvertenciaErrores(
"No existe el expediente")
Catch ex As WCF.ServicioBase.Contrato.Excepciones.ConsistenciaException
Mensajes.AdvertenciaErrores(
"Inconsistencia detectada al superar el máximo permitido de ficheros para un tipo documental")
Catch ex As Exception
AdministradorUILogging.TrazarError(
Me.[GetType]().FullName & " -> " & System.Reflection.MethodBase.GetCurrentMethod().Name & "." & ex.Message)
ExcepcionesIUUtil.ProcesarExcepcionPresentacion(ex,
Me.Container)
End Try
InicializarArbol()
Windows.Forms.Cursor.Current = Cursors.Arrow
http://www.alhambra-eidos.es/web2005/index.html