Mercurial > hg > Applications > TreeVNC
view src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java @ 34:f70008073a03
add TreeViewer.java
author | one |
---|---|
date | Tue, 04 Sep 2012 19:02:04 +0900 |
parents | |
children | 1b81deb0abb3 |
line wrap: on
line source
package com.glavsoft.viewer; import jp.ac.u_ryukyu.treevnc.client.MyVncClient; import jp.ac.u_ryukyu.treevnc.server.VncProxyService; public class TreeViewer { private boolean treeProxy; private boolean viewer; private String host; private int port; public static void main(String[] args) { new TreeViewer().vncStart(args); } private void vncStart(String[] args) { modeSelect(args); if (treeProxy) { VncProxyService vps = new VncProxyService(); vps.proxyStart(args); } else if (viewer) { Viewer v = new Viewer(); v.startViewer(args); } else { MyVncClient mvc = new MyVncClient(); mvc.startClient(args); } } private void modeSelect(String[] args) { for (int i = 0; i < args.length; i++) { if ("-p".equals(args[i])) { treeProxy = true; } else if ("-v".equals(args[i])) { viewer = true; } else if ("-r".equals(args[i])) { i++; host = args[i]; i++; port = Integer.parseInt(args[i]); treeProxy = true; } else { i++; System.out.println("(default) TreeVNCClient" + "-p TreeVNCProxy" + "-v VNCViewer" + "-r TreeVNCProxy for RemoteHost. you should input parameter host and port"); } } } }