Exemplo n.º 1
0
 protected virtual void OnRichEditControlUnhandledException(object sender, RichEditUnhandledExceptionEventArgs e) {
     try {
         if (e.Exception != null)
             throw e.Exception;
     }
     catch (RichEditUnsupportedFormatException ex) {
         DevExpress.XtraEditors.XtraMessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
         e.Handled = true;
     }
     catch (ExternalException ex) {
         DevExpress.XtraEditors.XtraMessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
         e.Handled = true;
     }
     catch (System.IO.IOException ex) {
         DevExpress.XtraEditors.XtraMessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
         e.Handled = true;
     }
 }
Exemplo n.º 2
0
 protected virtual void OnRichEditControlUnhandledException(object sender, RichEditUnhandledExceptionEventArgs e)
 {
     try {
         if (e.Exception != null)
         {
             throw e.Exception;
         }
     }
     catch (RichEditUnsupportedFormatException ex) {
         DevExpress.XtraEditors.XtraMessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
         e.Handled = true;
     }
     catch (ExternalException ex) {
         DevExpress.XtraEditors.XtraMessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
         e.Handled = true;
     }
     catch (System.IO.IOException ex) {
         DevExpress.XtraEditors.XtraMessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
         e.Handled = true;
     }
 }
Exemplo n.º 3
0
 void OnRichEditControlUnhandledException(object sender, RichEditUnhandledExceptionEventArgs e)
 {
     try {
         if (e.Exception != null)
         {
             throw e.Exception;
         }
     }
     catch (RichEditUnsupportedFormatException ex) {
         ShowMessage(ex.Message);
         e.Handled = true;
     }
     catch (System.Runtime.InteropServices.ExternalException ex) {
         ShowMessage(ex.Message);
         e.Handled = true;
     }
     catch (System.IO.IOException ex) {
         ShowMessage(ex.Message);
         e.Handled = true;
     }
     catch (System.InvalidOperationException ex) {
         if (ex.Message == DevExpress.XtraRichEdit.Localization.XtraRichEditLocalizer.GetString(DevExpress.XtraRichEdit.Localization.XtraRichEditStringId.Msg_MagicNumberNotFound) ||
             ex.Message == DevExpress.XtraRichEdit.Localization.XtraRichEditLocalizer.GetString(DevExpress.XtraRichEdit.Localization.XtraRichEditStringId.Msg_UnsupportedDocVersion))
         {
             ShowMessage(ex.Message);
             e.Handled = true;
         }
         else
         {
             throw ex;
         }
     }
     catch (SystemException ex) {
         ShowMessage(ex.Message);
         e.Handled = true;
     }
 }
 private void txtHtmlControl_UnhandledException(object sender, RichEditUnhandledExceptionEventArgs e)
 {
     e.Handled = true;
 }
Exemplo n.º 5
0
 private void onUnhandledException(object sender, RichEditUnhandledExceptionEventArgs richEditUnhandledExceptionEventArgs)
 {
     richEditUnhandledExceptionEventArgs.Handled = true;
 }