Created
October 16, 2010 02:47
-
-
Save eugener/629333 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TaskDialog dlg = new TaskDialog("Security Warning"); | |
dlg.setInstruction( "The publisher cannot be verified.\nDo you want to run this software?" ); | |
dlg.setText( "Name: C:\\Program Files\\eclipse\\eclipse.exe\n" + | |
"Publisher: <b>Unknown Publisher</b>\n" + | |
"Type: Application\n"); | |
dlg.setIcon( TaskDialog.StandardIcon.WARNING ); | |
dlg.getFooter().setCheckBoxText("Always ask before opening this file"); | |
dlg.setCommands( StandardCommand.OK.derive("Run"), StandardCommand.CANCEL ); | |
if ( dlg.show().equals(StandardCommand.OK)) { | |
//do something | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment