Guest User

Untitled

a guest
Jun 18th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. TaskDialog dlg = new TaskDialog("Security Warning");
  2. dlg.setInstruction( "The publisher cannot be verified.\nDo you want to run this software?" );
  3. dlg.setText( "Name: C:\\Program Files\\eclipse\\eclipse.exe\n" +
  4. "Publisher: <b>Unknown Publisher</b>\n" +
  5. "Type: Application\n");
  6. dlg.setIcon( TaskDialog.StandardIcon.WARNING );
  7. dlg.getFooter().setCheckBoxText("Always ask before opening this file");
  8. dlg.setCommands( StandardCommand.OK.derive("Run"), StandardCommand.CANCEL );
  9. if ( dlg.show().equals(StandardCommand.OK)) {
  10. //do something
  11. }
Add Comment
Please, Sign In to add comment