OnToastResult

<< Click to Display Table of Contents >>

Navigation:  EasyDotNet documentation > Classes > TWinToastManager class > Events >

OnToastResult

Previous pageReturn to chapter overviewNext page

Gets toast notification result.

 

pTag - toast notification ID set when you called ShowToast()

pResult - toast notification result

pArgument - identifier of the pressed button on the toast notification (if toast notification contained buttons and the user pressed one of them)

 

OnToastResult                   PROCEDURE(STRING pTag, ToastResult pResult, STRING pArgument), VIRTUAL, PROTECTED

 

 

Example:

 

CASE pResult

OF ToastResult::Unavailable

   ToastG:Result = 'Toast notification is unavailable on current OS.'

OF ToastResult::Invalid

   ToastG:Result = 'Toast request is invalid.'

OF ToastResult::Activated

   ToastG:Result = 'The user activated the toast.'

OF ToastResult::AppHidden

   ToastG:Result = 'The application hid the toast using ToastNotifier.hide method.'

OF ToastResult::UserCanceled

   ToastG:Result = 'The user dismissed the toast.'

OF ToastResult::TimedOut

   ToastG:Result = 'The toast has timed out.'

OF ToastResult::Failed

   ToastG:Result = 'The toast encountered an error.'

ELSE

  ToastG:Result = 'Unknown result.'

END

 

 IF pArgument

   ToastG:Result = CLIP(ToastG:Result) &' User choice: "'& pArgument &'"'

END

 

DISPLAY(?ToastG:Result)