@@ -47,7 +47,8 @@ namespace IntelleSoft
4747 ShowUI = BTA_SHOWUI,
4848 SaveReport = BTA_SAVEREPORT,
4949 MailReport = BTA_MAILREPORT,
50- SendReport = BTA_SENDREPORT
50+ SendReport = BTA_SENDREPORT,
51+ Custom = BTA_CUSTOM
5152 };
5253
5354 [Flags]
@@ -373,6 +374,8 @@ namespace IntelleSoft
373374
374375 public delegate void UnhandledExceptionDelegate (Object^ sender, UnhandledExceptionEventArgs^ args);
375376
377+ public delegate void CustomActivityDelegate (Object^ sender, String^ reportFilePath);
378+
376379 public ref class ExceptionHandler
377380 {
378381 private:
@@ -391,6 +394,7 @@ namespace IntelleSoft
391394
392395 static void ValidateIoResult (BOOL bResult);
393396
397+ static event CustomActivityDelegate^ customActivityEvent;
394398 internal:
395399 static property System::Exception^ Exception
396400 {
@@ -418,7 +422,7 @@ namespace IntelleSoft
418422
419423 static void FireBeforeUnhandledExceptionEvent (void );
420424 static void FireAfterUnhandledExceptionEvent (void );
421-
425+ static void FireCustomActivityEvent (String^ reportFilePath);
422426 public:
423427 static const int HttpPort = BUGTRAP_HTTP_PORT;
424428
@@ -434,6 +438,12 @@ namespace IntelleSoft
434438 void remove (UnhandledExceptionDelegate^ value);
435439 }
436440
441+ static event CustomActivityDelegate^ CustomActivity
442+ {
443+ void add (CustomActivityDelegate^ value);
444+ void remove (CustomActivityDelegate^ value);
445+ }
446+
437447 static property String^ AppName
438448 {
439449 String^ get (void );
@@ -596,6 +606,11 @@ namespace IntelleSoft
596606 afterUnhandledExceptionEvent (Sender, Arguments);
597607 }
598608
609+ inline void ExceptionHandler::FireCustomActivityEvent (String^ reportFilePath)
610+ {
611+ customActivityEvent (Sender, reportFilePath);
612+ }
613+
599614 inline void ExceptionHandler::BeforeUnhandledException::add (UnhandledExceptionDelegate^ value)
600615 {
601616 beforeUnhandledExceptionEvent += value;
@@ -616,6 +631,16 @@ namespace IntelleSoft
616631 afterUnhandledExceptionEvent -= value;
617632 }
618633
634+ inline void ExceptionHandler::CustomActivity::add (CustomActivityDelegate^ value)
635+ {
636+ customActivityEvent += value;
637+ }
638+
639+ inline void ExceptionHandler::CustomActivity::remove (CustomActivityDelegate^ value)
640+ {
641+ customActivityEvent -= value;
642+ }
643+
619644 inline String^ ExceptionHandler::AppName::get(void )
620645 {
621646 return gcnew String (BT_GetAppName ());
0 commit comments