示例#1
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();
  }
示例#2
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();
  }
示例#3
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);
  }