Ejemplo n.º 1
0
  @AfterViews
  void init() {

    // if user has input the username and any one password;
    if (hasSetAccount() && !isStartFormMenu) {
      Main_.intent(this).start();
      finish();
    } else {
      setUpViews();
    }
  }
Ejemplo n.º 2
0
  private void saveAccount(
      String userName, String eduSysPassword, String libPassword, String cardPassword) {
    // Base64.NO_WRAP will not padding a %0a;
    AppContext.userName = userName;
    AppContext.eduSysPassword = eduSysPassword;
    AppContext.libPassword = libPassword;
    AppContext.cardPassword = cardPassword;

    eduSysPassword = cryptUtil.encrypt(eduSysPassword);
    libPassword = cryptUtil.encrypt(libPassword);
    cardPassword = cryptUtil.encrypt(cardPassword);

    app.config.userName().put(userName);
    app.config.eduSysPassword().put(eduSysPassword);
    app.config.libPassword().put(libPassword);
    app.config.cardPassword().put(cardPassword);

    if (!isStartFormMenu) Main_.intent(this).start();
    finish();
  }