elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Recopilación Tutoriales y Manuales Hacking, Seguridad, Privacidad, Hardware, etc


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP) (Moderador: kub0x)
| | | |-+  [SOURCE] Elektro RadErrorDialog
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [SOURCE] Elektro RadErrorDialog  (Leído 2,303 veces)
Eleкtro
Ex-Staff
*
Desconectado Desconectado

Mensajes: 9.788



Ver Perfil
[SOURCE] Elektro RadErrorDialog
« en: 1 Septiembre 2014, 21:40 pm »

Elektro RadErrorDialog



Descripción:

Esto es simplemente un RadForm que diseñé para manejar excepciones cara al end-user, lo pueden añadir a sus proyectos como una plantilla de Item.

Dependencias: Telerik RAD Controls

Si quieren una versión sin dependencias de terceros, es decir, usando los controles de .NET framework, entonces visiten: [SOURCE] Elektro ErrorDialog Autor: EleKtro



Imágenes:

     

   



Ejemplos de uso:

(Ejemplo de uso básico)
Código
  1.    Private Shadows Sub Shown(sender As Object, e As EventArgs) _
  2.    Handles MyBase.Shown
  3.  
  4.        Try
  5.            Dim Url As New Uri(String.Empty)
  6.  
  7.        Catch ex As Exception
  8.  
  9.            Using ErrorDialog As New RadErrorDialog(ex, sender)
  10.                ErrorDialog.ShowDialog()
  11.            End Using
  12.  
  13.        End Try
  14.  
  15.    End Sub

(Ejemplo de uso avanzado)
Código
  1. Public Class Form1
  2.  
  3.    Public Sub New()
  4.  
  5.        ' This call is required by the designer.
  6.        InitializeComponent()
  7.  
  8.        ' Catches Managed Exceptions.
  9.        AddHandler AppDomain.CurrentDomain.FirstChanceException, AddressOf Application_ManagedException
  10.  
  11.        ' Catches Unhandled Exceptions.
  12.        AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf Application_UnhandledException
  13.  
  14.        ' Catches Thread Exceptions.
  15.        AddHandler Application.ThreadException, AddressOf Application_ThreadException
  16.  
  17.    End Sub
  18.  
  19.    ''' <summary>
  20.    ''' Handles the 'UnhandledException' event of the Application.
  21.    ''' </summary>
  22.    ''' <param name="sender">The source of the event.</param>
  23.    ''' <param name="e">The <see cref="UnhandledExceptionEventArgs"/> instance containing the event data.</param>
  24.    Private Sub Application_UnhandledException(ByVal sender As Object, ByVal e As UnhandledExceptionEventArgs)
  25.  
  26.        Using ErrorDialog As New RadErrorDialog(DirectCast(e.ExceptionObject, Exception), Me)
  27.            ErrorDialog.ShowDialog()
  28.        End Using
  29.  
  30.    End Sub
  31.  
  32.    ''' <summary>
  33.    ''' Handles the 'FirstChanceException' event of the Application.
  34.    ''' </summary>
  35.    ''' <param name="sender">The source of the event.</param>
  36.    ''' <param name="e">The <see cref="Runtime.ExceptionServices.FirstChanceExceptionEventArgs" /> instance containing the event data.</param>
  37.    Private Sub Application_ManagedException(ByVal sender As Object, ByVal e As Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
  38.  
  39.        Using ErrorDialog As New RadErrorDialog(e.Exception, Me)
  40.            ErrorDialog.ShowDialog()
  41.        End Using
  42.  
  43.    End Sub
  44.  
  45.    ''' <summary>
  46.    ''' Handles the 'ThreadException' event of the Application.
  47.    ''' </summary>
  48.    ''' <param name="sender">The source of the event.</param>
  49.    ''' <param name="e">The <see cref="Threading.ThreadExceptionEventArgs"/> instance containing the event data.</param>
  50.    Private Sub Application_ThreadException(sender As Object, e As Threading.ThreadExceptionEventArgs)
  51.  
  52.        Using ErrorDialog As New RadErrorDialog(e.Exception, Me)
  53.            ErrorDialog.ShowDialog()
  54.        End Using
  55.  
  56.    End Sub
  57.  
  58. End Class



Descarga:

http://www.mediafire.com/download/shg634whhdwg3ba/RadErrorDialog.rar


En línea

XresH


Desconectado Desconectado

Mensajes: 384



Ver Perfil WWW
Re: [SOURCE] Elektro RadErrorDialog
« Respuesta #1 en: 8 Septiembre 2014, 03:14 am »

Excelente aporte, buenos codigos para practicar el .NET, a mi gusto es una excelente forma, aprender aún mas de un x lenguaje, leyendo escrituras de otros programadores.

Saludos.


En línea

[ - Si eres programador y quieres que tus proyectos esten en mi blog(con o sin source), consúltame! - ]
Entra A Mi Blog De Programación | | Dudas en este post :| | >>Clic para ir al Post<<
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[SOURCE] Elektro ErrorDialog
.NET (C#, VB.NET, ASP)
Eleкtro 3 4,320 Último mensaje 28 Junio 2014, 06:36 am
por Eleкtro
Felcidades ELEKTRO!!
Foro Libre
WIитX 5 3,163 Último mensaje 9 Septiembre 2014, 16:26 pm
por @synthesize
el moderador elektro es 'malo'?
Sugerencias y dudas sobre el Foro
MRx86 1 3,140 Último mensaje 3 Octubre 2016, 10:31 am
por Eleкtro
¿Donde esta Elektro?
Foro Libre
Poyoncio 2 2,061 Último mensaje 12 Noviembre 2016, 19:52 pm
por Machacador
[SOURCE-CODE][VB] Elektro User Controls - Controles de usuario para WindowsForms
.NET (C#, VB.NET, ASP)
Eleкtro 1 4,491 Último mensaje 13 Mayo 2017, 14:26 pm
por Borito30
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines