예제 #1
0
def simple_console():
    global frame
    frame = JFrame("[BETA] GameMaster Bot - Log")
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)
    frame.setBounds(0,45,560,30)
    global messageLOG
    messageLOG = JLabel("")
    frame.add(messageLOG,BorderLayout.CENTER)
    button = JButton("QUIT", actionPerformed =closeFrame)
    button.setForeground(Color.RED)
    frame.add(button,BorderLayout.WEST)
    frame.setUndecorated(True)
    frame.setAlwaysOnTop(True)
    frame.setVisible(True)
    log("Welcome to GameMaster\'s Bot!")
예제 #2
0
if not currentSelectedItems:
    show_error_message("Items must be selected before running this script!")
# Ensure we have an APIKEY
elif APIKEY == "":
    show_error_message("VirusTotal API key must be set.")
# Initial checks good, lets run the script
else:
    global cancelled
    cancelled = False

    # Do some UI setup here to keep the main() method a little easier to read
    jframe = JFrame("VirusTotal Integration",
                    defaultCloseOperation=JFrame.DISPOSE_ON_CLOSE,
                    size=(300, 100),
                    locationRelativeTo=None)
    jframe.setUndecorated(True)
    statusLabel = JLabel("", JLabel.CENTER)
    jframe.setResizable(False)
    jframe.setLayout(GridLayout(3, 1))
    statusLabel.setSize(300, 50)
    jframe.getContentPane().add(statusLabel)
    jbutton = JButton('Cancel')
    jbutton.addActionListener(cancel)

    # Run the main code function
    result = main()

    # Clean up jframe and show the result message
    jframe.setVisible(False)
    jframe.dispose()
    if result: