Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // By default, "EurekaLog Detailed" dialog will send bug report and close/restart/terminate application when dialog is closed.
- // This can be not an intuitive behaviour when this dialog is shown from another dialog (such as "MS Classic").
- // This code can be used to change this behaviour, so closing "EurekaLog Detailed" dialog will revert back to previous dialog.
- uses
- ETypes,
- EDialog,
- EDialogWinAPIEurekaLogDetailed;
- type
- // Override dialog class to customize its behaviour
- TEurekaLogDetailedDialog = class(EDialogWinAPIEurekaLogDetailed.TEurekaLogDetailedDialog)
- protected
- function AssignOnCloseData: Boolean; override;
- function GetCanSend: Boolean; override;
- function GetShowTerminateControl: Boolean; override;
- function GetShowAppendDetailsControl: Boolean; override;
- end;
- { TEurekaLogDetailedDialog }
- function TEurekaLogDetailedDialog.AssignOnCloseData: Boolean;
- begin
- // Switch dialog back to previous dialog type
- Options.ExceptionDialogType := FallbackDialogClass;
- if Options.ExceptionDialogType = edtNone then
- Options.ExceptionDialogType := edtEurekaLog;
- FResponse.SendResult := srRestart;
- Result := inherited;
- end;
- // Disable some UI elements in dialog:
- function TEurekaLogDetailedDialog.GetCanSend: Boolean;
- begin
- Result := False;
- end;
- function TEurekaLogDetailedDialog.GetShowAppendDetailsControl: Boolean;
- begin
- Result := False;
- end;
- function TEurekaLogDetailedDialog.GetShowTerminateControl: Boolean;
- begin
- Result := False;
- end;
- initialization
- // Register our class to be used by EurekaLog.
- // Be sure to register it as "first" - to override default class
- RegisterDialogClassFirst(TEurekaLogDetailedDialog);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement