Esempio n. 1
0
  /** Add to the private attribute "tasks" all the tasks */
  public static void listTasks() {

    writeInS3270(WrapperCodes.click(2), false); // LIST TASKS
    writeInS3270(WrapperCodes.ENTER, false);
    writeInS3270(WrapperCodes.click(1), false); // GENERAL TASKS
    enter_printtext();
    writeInS3270(WrapperCodes.click(2), false); // SPECIFIC TASKS
    enter_printtext();
    writeInS3270(WrapperCodes.click(3), false); // Back to main menu
    enter_printtext();
  }
Esempio n. 2
0
 private static void startTareas() {
   writeInS3270(WrapperCodes.CONNECT, true);
   writeInS3270(WrapperCodes.ENTER, true);
   writeInS3270(WrapperCodes.ENTER, true);
   writeInS3270(WrapperCodes.PRINTTEXT, true);
   writeInS3270(WrapperCodes.enterString(WrapperCodes.LOGIN_ID), true);
   writeInS3270(WrapperCodes.TAB, true);
   writeInS3270(WrapperCodes.enterString(WrapperCodes.LOGIN_PASS), true);
   writeInS3270(WrapperCodes.PRINTTEXT, true);
   writeInS3270(WrapperCodes.ENTER, true);
   writeInS3270(WrapperCodes.ENTER, true);
   writeInS3270(WrapperCodes.enterString(WrapperCodes.FLIB), true);
   writeInS3270(WrapperCodes.ENTER, true);
   writeInS3270(WrapperCodes.enterString(WrapperCodes.TAREAS), true);
   writeInS3270(WrapperCodes.ENTER, true);
 }
Esempio n. 3
0
  /**
   * Adds a mew task
   *
   * @param name Name, if null -> GENERAL TASK
   * @param date Date formate DDMM
   * @param desc Description
   */
  public static void addTask(String name, String date, String desc) {

    writeInS3270(WrapperCodes.click(1), false); // ASIGN TASK
    enter_printtext();

    // GENERAL TASK
    if (name == null) {
      writeInS3270(WrapperCodes.click(1), false); // GENERAL TASK
    }
    // SPECIFIC TASK
    else {
      name = removeSpaces(name);
      writeInS3270(WrapperCodes.click(2), false); // SPECIFIC TASK
    }

    enter_printtext();

    writeInS3270(WrapperCodes.enterString(date), false); // Enter date
    enter_printtext();

    // Enter name if SPECIFIC TASK
    if (name != null) {
      writeInS3270(WrapperCodes.enterString(name), false); // Enter name
      enter_printtext();
    }
    desc = removeSpaces(desc);
    writeInS3270(WrapperCodes.enterString(desc), false); // Enter desc
    enter_printtext();

    writeInS3270(WrapperCodes.click(3), false); // Back to main menu
    enter_printtext();

    writeInS3270(WrapperCodes.PRINTTEXT, true);
    listTasks();
  }
Esempio n. 4
0
  public static void exit() {
    writeInS3270(WrapperCodes.click(3), false); // Exit
    writeInS3270(WrapperCodes.ENTER, false);
    writeInS3270(WrapperCodes.ENTER, false);

    try {
      writeInS3270(WrapperCodes.DISCONNECT, false);
      read.close();
      write.close();
      s3270.destroy();
    } catch (IOException e) {
      System.err.println(e);
    }
    System.exit(0);
  }