예제 #1
0
  public static void main(String[] args) throws InterruptedException {

    WebDriver driver = new FirefoxDriver();
    Login.login(driver);
    //		String requestNumber = RequestActions.createRequest(driver);
    RequestActions.approveRequest(driver, "%10119");
  }
예제 #2
0
  public static void main(String[] args) {
    System.out.println("hello client");
    init();
    System.out.println("Connecting to server...");
    connect();
    if (serverPortal == null) {
      System.out.println("did not find active server");
      System.exit(1);
    }

    boolean connected = false;
    do {
      try {
        userSession = new Login(serverPortal);
        connected = userSession.login();
      } catch (RemoteException ex) {
        reconnect(ex);
      }
    } while (!connected);

    String localPath = userSession.getSyncPath();
    String tempPath = userSession.getMetaPath();
    String userName = userSession.getUserName();
    String device = userSession.getDeviceID();
    String dataPath = tempPath + "filelist.obj";

    try {
      boolean recursive = false;
      watchService = new WatchDir(localPath, recursive, userName, device, dataPath);

    } catch (IOException ex) {
      System.out.println("HI IO");
      System.out.println(ex.getMessage());
    }
    new Thread(watchService).start();
    sync = new Sync(userName, device, serverPortal, localPath, tempPath, dataPath);
    sync.setClientFileList(watchService.loadFileList());
    startSync();
  }
예제 #3
0
파일: Login.java 프로젝트: lich0079/Mycode
 public void actionPerformed(ActionEvent e) {
   login();
 }