コード例 #1
0
ファイル: Bottom.java プロジェクト: Prevan/sofspinner
    @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();
        }
      }
    }
コード例 #2
0
ファイル: EnterGame.java プロジェクト: Prevan/sofspinner
  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();
    }
  }