Ejemplo n.º 1
0
    @Override
    public void actionPerformed(ActionEvent e) {

      if (e.getSource() == start) {

        System.out.println("id List: " + Setup.getMainPanel().getTopLeftPanel().getIdsFile());
        System.out.println("Prize Log: " + Setup.getMainPanel().getTopLeftPanel().getPrizesFile());

        if (Setup.getMainPanel().getTopRightPanel().isGlobalSerEnabled()) {

          System.out.println(
              "Global serial: " + Setup.getMainPanel().getTopRightPanel().getGlobalSer());
        }

        Setup.dispose();
      }

      if (e.getSource() == help) {

        try {

          java.awt.Desktop.getDesktop()
              .browse(
                  java.net.URI.create(
                      "http://www.powerbot.org/community/topic/755991-squeal-of-fortune-spinner/"));

        } catch (IOException e1) {

          e1.printStackTrace();
        }
      }
    }
Ejemplo n.º 2
0
  public Bottom() {

    setPreferredSize(new Dimension(Setup.getWidth(), Setup.getHeight() / 4));

    setLayout(new BorderLayout());

    start.addActionListener(new ButtonListener());
    help.addActionListener(new ButtonListener());

    JPanel left = new JPanel();
    JPanel right = new JPanel();

    saveMask.setEnabled(false);

    coins.addItemListener(new OptionsListener());
    saveMask.addItemListener(new OptionsListener());

    left.add(coins);
    left.add(saveMask);

    right.add(help);
    right.add(start);

    add(right, BorderLayout.EAST);
    add(left, BorderLayout.WEST);
  }
Ejemplo n.º 3
0
  public void getId() {

    try {

      if (Squeal.anotherId()) {

        String id = Squeal.nextId();

        System.out.println(id);

        Scanner manageId = new Scanner(id);

        manageId.useDelimiter(":");

        String aId = manageId.next();

        System.out.println("Id: " + aId);

        if (manageId.hasNext()) {

          String serial = manageId.next();

          Squeal.setSerial(serial);

          System.out.println("Serial: " + serial);

        } else {

          Squeal.setSerial(Squeal.getGlobalSerial());

          System.out.println("Serial: " + Squeal.getCurrentSerial());
        }

        Squeal.setId(aId);
        Squeal.addSpin();

      } else {

        System.out.println("There are not anymore ids");
        System.out.println("Restarting list..");

        Squeal.setScanner(
            new Scanner(new FileReader(Setup.getMainPanel().getTopLeftPanel().getIdsFile())));
      }

    } catch (Exception e) {

      e.printStackTrace();
    }
  }